RFR: 8086027: Multiple STATIC_ASSERTs at class scope doesn't work (original) (raw)
David Holmes david.holmes at oracle.com
Tue Jun 9 06:17:44 UTC 2015
- Previous message: RFR: 8086027: Multiple STATIC_ASSERTs at class scope doesn't work
- Next message: RFR: 8086027: Multiple STATIC_ASSERTs at class scope doesn't work
- Messages sorted by: [ date ] [ thread ] [ subject ] [ author ]
Hi Kim,
On 9/06/2015 3:51 PM, Kim Barrett wrote:
Third time's the charm?
Please review this change to the STATICASSERT 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 ).
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.
Ok.
As part of this, I'm also adding PASTETOKENS(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 ?
Thanks, David
CR: https://bugs.openjdk.java.net/browse/JDK-8086027
Webrev: http://cr.openjdk.java.net/~kbarrett/8086027/webrev.00/ Testing: JPRT
- Previous message: RFR: 8086027: Multiple STATIC_ASSERTs at class scope doesn't work
- Next message: RFR: 8086027: Multiple STATIC_ASSERTs at class scope doesn't work
- Messages sorted by: [ date ] [ thread ] [ subject ] [ author ]