-
Type:
Enhancement
-
Resolution: Fixed
-
Priority:
P4
-
Affects Version/s: 13
-
Component/s: hotspot
-
b07
-
generic
-
generic
HotSpot already has PRAGMA_DIAG_PUSH/POP macro pair. However, they only have non-empty expansions for gcc/clang. Visual Studio has long supported a similar mechanism, and these macros should be implemented there too.
Even with the PUSH/POP pair though, it's often clumsy to locally disable a warning, since the syntax for doing so is so compiler-specific. This leads to #ifdef checking to determine whether the relevant compiler is being used at each site.
Since the warnings to be suppressed are themselves compiler-specific, this situation could be improved by providing compiler-specific macros to disable warnings. If not using that compiler, the macros would have empty expansions.
Even with the PUSH/POP pair though, it's often clumsy to locally disable a warning, since the syntax for doing so is so compiler-specific. This leads to #ifdef checking to determine whether the relevant compiler is being used at each site.
Since the warnings to be suppressed are themselves compiler-specific, this situation could be improved by providing compiler-specific macros to disable warnings. If not using that compiler, the macros would have empty expansions.