RFR: 8332042: Move MEMFLAGS to its own include file [v2]

Stefan Karlsson stefank at openjdk.org
Mon May 13 15:39:17 UTC 2024


On Mon, 13 May 2024 15:26:18 GMT, Daniel D. Daugherty <dcubed at openjdk.org> wrote:

>> Could you instead put the static_assert near the code that will break? Right now it looks obscure and weird to have this check when it is obviously correct as long as no one changes the definition. Would it be enough to write a comment in the header that this needs to be 1 byte?
>
> To quote @robehn - Why write a comment for a rule if you can enforce it with code instead...

I tend to agree with that. My earlier question still stands is there a better place to put it? Right now the "enforced" code in a stand-alone file doesn't tell me "why" this is important.

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

PR Review Comment: https://git.openjdk.org/jdk/pull/19172#discussion_r1598679057


More information about the serviceability-dev mailing list