RFR: 8086027: Multiple STATIC_ASSERTs at class scope doesn't work
Kim Barrett
kim.barrett at oracle.com
Tue Jun 9 05:51:56 UTC 2015
Third time's the charm?
Please review this change to the STATIC_ASSERT macro, to allow
multiple assertions in the same class scope.
It seems we do need to make the typedef names used in the expansion
unique per scope; see CR for details. We accomplish this with
preprocessor token pasting with __LINE__ (done correctly, unlike in
the change for JDK-8067306).
Apparently my testing for JDK-8073994 missed the class scope case.
With this change set I'm adding tests for all three of namespace,
class, and function scope.
As part of this, I'm also adding PASTE_TOKENS(x, y) utility macro.
I'm willing to entertain alternative naming suggestions, though hoping
to avoid a bikeshed discussion.
CR:
https://bugs.openjdk.java.net/browse/JDK-8086027
Webrev:
http://cr.openjdk.java.net/~kbarrett/8086027/webrev.00/
Testing:
JPRT
More information about the hotspot-dev
mailing list