RFR: 8086027: Multiple STATIC_ASSERTs at class scope doesn't work

David Holmes david.holmes at oracle.com
Tue Jun 9 06:17:44 UTC 2015

Hi Kim,

On 9/06/2015 3:51 PM, Kim Barrett wrote:
> 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).

Seems okay to me (but then so did previous version <sigh>).

> 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.

As we already have XSTR for the single token case, what about XSTRCAT ?


> CR:
> https://bugs.openjdk.java.net/browse/JDK-8086027
> Webrev:
> http://cr.openjdk.java.net/~kbarrett/8086027/webrev.00/
> Testing:

More information about the hotspot-dev mailing list