RFR: 8067306: Improve STATIC_ASSERT

Erik Helin erik.helin at oracle.com
Fri Dec 12 08:27:01 UTC 2014

On 2014-12-12, Kim Barrett wrote:
> Please review this enhancement to the hotspot STATIC_ASSERT() macro.
> I will also need a sponsor for this change.
> [Note: Although this is in "runtime", development was done in hs-gc
> rather than hs-rt, and I'd rather have it pushed via hs-gc. The point
> of making this change was that I wanted it for some other work I'm
> doing. I'd rather not wait for repo reconcilliation, and I don't think
> anyone else is champing at the bit for this.]
> CR:
> https://bugs.openjdk.java.net/browse/JDK-8067306
> Webrev:
> http://cr.openjdk.java.net/~kbarrett/8067306/webrev/

Looks good, thanks for improving this. Do we really need the
implementation note? The implementation itself is pretty clear to me.


> Testing:
> JPRT with temporary static assertions inserted at top-level, at class
> scope, and with value dependent on a template parameter, to verify the
> macro can now be used in those contexts. [The code base already
> contains several uses in function bodies, including with template
> dependencies.]
> JPRT with temporary intentional static assertion failures at
> top-level, class scope, function scope, and with value dependent on a
> template parameter, to verify expected failures occurred, and that the
> compiler error messages were informative.

More information about the hotspot-runtime-dev mailing list