RFR: 8318481: linux-arm32 attribute warning for offset_of

Erik Joelsson erikj at openjdk.org
Thu Oct 19 15:09:58 UTC 2023


On Wed, 18 Oct 2023 23:02:18 GMT, Mikael Vidstedt <mikael at openjdk.org> wrote:

> The linux-arm32 build generates a somewhat spectacular number of warnings, all for the same code - the offset_of macro in hotspot:
> 
> 
> src/hotspot/share/utilities/globalDefinitions_gcc.hpp:144:40: warning: requested alignment 16 is larger than 8 [-Wattributes]
>     alignas(16) char space[sizeof (klass)];
> 
> 
> I was hoping to find a simple fix for the code in question but I'm not sure what that would look like. Until proven otherwise I propose that we disable the warning for arm32.

make/hotspot/lib/CompileJvm.gmk line 92:

> 90: 
> 91: ifeq ($(call isTargetCpu, arm), true)
> 92:     DISABLED_WARNINGS_gcc += attributes

Suggestion:

  DISABLED_WARNINGS_gcc += attributes

-------------

PR Review Comment: https://git.openjdk.org/jdk/pull/16256#discussion_r1365611741


More information about the build-dev mailing list