RFR: 8301244: Replace legacy pragma implementations in HotSpot
Kim Barrett
kbarrett at openjdk.org
Sat Jan 28 12:48:17 UTC 2023
On Fri, 27 Jan 2023 13:40:20 GMT, Julian Waters <jwaters at openjdk.org> wrote:
> HotSpot has a few legacy implementations of pragmas in some of its macros, they should be cleaned up and instead use a shared new PRAGMA macro available to all platforms
Sorry, but I'm not seeing the benefit of making this change. The new shared
PRAGMA macro even seems like a negative to me. If there were more kinds of
pragmas we were defining for GCC-style compilers then I would probably support
a GCC-specific stringizing support macro, but I don't see any benefit to forcing
the VS platform to stringize.
src/hotspot/share/utilities/macros.hpp line 33:
> 31: // For when Pragmas need to be reliably nested in macros. Also handles
> 32: // quotation marks, so use sites are not required to pass string literals
> 33: #define PRAGMA(str) _Pragma(#str)
This shouldn't be here. A file could include only compilerWarnings.hpp and not this file, and not be able to use pragma macros provided by compilerWarnings.hpp.
-------------
PR: https://git.openjdk.org/jdk/pull/12255
More information about the hotspot-dev
mailing list