[prev in list] [next in list] [prev in thread] [next in thread] 

List:       openjdk-serviceability-dev
Subject:    Re: RFR: 8305341: Alignment outside of HotSpot should be enforced by alignas instead of compiler spe
From:       Chris Plummer <cjplummer () openjdk ! org>
Date:       2023-03-31 19:57:18
Message-ID: WaX4NJQanrjjT1GzVgdzYigHlUVUjXDlqcMlgtBG__I=.12953152-3339-45d2-88ff-f7ae178de2f7 () github ! com
[Download RAW message or body]

On Fri, 31 Mar 2023 06:07:39 GMT, Julian Waters <jwaters@openjdk.org> wrote:

> C11 has been stable for a long time on all platforms, so native code can use the \
> standard alignas operator for alignment requirements

I don't have any comments on this change in general (it's not something I've dealt \
with in the past), but I did notice that there are a couple of places you missed:


src/hotspot/share/utilities/globalDefinitions_visCPP.hpp:119:#define \
ATTRIBUTE_ALIGNED(x) __declspec(align(x)) \
src/java.desktop/share/native/libfreetype/include/freetype/internal/ftvalid.h:82:  /* \
__declspec(align())' in order to compile cleanly with */ \
src/java.desktop/share/native/libfreetype/src/smooth/ftgrays.c:484:  /* \
__declspec(align())' in order to compile cleanly with */


For the 2nd and 3rd ones you would want to remove all of the following:


#if defined( _MSC_VER )      /* Visual C++ (and Intel C++) */
  /* We disable the warning `structure was padded due to   */
  /* __declspec(align())' in order to compile cleanly with */
  /* the maximum level of warnings.                        */
#pragma warning( push )
#pragma warning( disable : 4324 )
#endif /* _MSC_VER */
...
#if defined( _MSC_VER )
#pragma warning( pop )
#endif

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

PR Comment: https://git.openjdk.org/jdk/pull/13258#issuecomment-1492522828


[prev in list] [next in list] [prev in thread] [next in thread] 

Configure | About | News | Add a list | Sponsored by KoreLogic