RFR: 8297912: Redo 8252584: HotSpot Style Guide should permit alignas with the proper approval
Kim Barrett
kbarrett at openjdk.org
Fri Dec 2 08:45:13 UTC 2022
On Thu, 1 Dec 2022 07:36:58 GMT, Thomas Stuefe <stuefe at openjdk.org> wrote:
> could you give this PR/JBS please a speaking name, e.g. "HotSpot Style Guide should permit alignas (second attempt)". Nobody remembers all JBS issue numbers :)
+1
> Also, @rose00 voiced concerns in the original PR ([#11315 (comment)](https://github.com/openjdk/jdk/pull/11315#issuecomment-1332982465)) which should be addressed first. I cautiously share his concerns for the moment.
I had somewhat similar concerns to @rose00 at one point. We have
`ATTRIBUTE_ALIGNED` for this sort of thing; is `alignas` actually better? I
think it is, though perhaps weakly. It's a bit shorter and less noisy (which
some might not consider a positive). It is in most respects equivalent to our
macro, and will work for other compilers (I think there are some) without
needing to specialize the macro.
The proposal seems like a lot of words, describing significant restrictions.
The thing is, very nearly all of those words apply to our `ATTRIBUTE_ALIGNED`
macro too, but aren't written down anywhere.
So I approve of this change, though I won't be heartbroken if it is rejected.
If it's rejected, I'll mine it for documentation comments for our macro.
-------------
PR: https://git.openjdk.org/jdk/pull/11446
More information about the hotspot-dev
mailing list