RFR: 8300080: offset_of for GCC/Clang exhibits undefined behavior and is not always a compile-time constant
Kim Barrett
kbarrett at openjdk.org
Wed Sep 3 18:52:42 UTC 2025
On Wed, 3 Sep 2025 07:28:49 GMT, Stefan Karlsson <stefank at openjdk.org> wrote:
> Nice. Is it worth pushing this so near the transition to compile with C++17 support?
Including the warning suppression gives something that's usefully backportable, which would make it
easier to backport changes that happen to include any future `offset_of` to `offsetof` changes.
The warning suppression is harmless in C++17 mode, and can be removed at leisure once that mode is engaged.
-------------
PR Comment: https://git.openjdk.org/jdk/pull/27061#issuecomment-3250377743
More information about the hotspot-dev
mailing list