RFR: 8073994: STATIC_ASSERT use of __LINE__ is wrong
David Holmes
david.holmes at oracle.com
Wed Mar 18 01:48:29 UTC 2015
On 18/03/2015 7:54 AM, Kim Barrett wrote:
> Any takers?
I didn't realize this was still pending. You had my Review - sorry if
that wasn't clear.
Do you still need a second reviewer?
David
> On Mar 4, 2015, at 3:14 PM, Kim Barrett <kim.barrett at oracle.com> wrote:
>>
>> Please review this small cleanup of the infrastructure underlying the
>> STATIC_ASSERT macro.
>>
>> I will need a sponsor for this change.
>>
>> STATIC_ASSERT is using macro token splicing incorrectly to (attempt
>> to) produce a unique type name. Rather than fixing the splicing we
>> note that the unique type name isn't actually needed.
>>
>> - If the assertion fails the type name never gets used at all.
>>
>> - If the assertion passes we're just redefining a typedef name with
>> the same type, which is permitted (C++03 7.1.3 clause 3).
>>
>> So we just pick a dummy type name to always use.
>>
>> CR:
>> https://bugs.openjdk.java.net/browse/JDK-8073994
>>
>> Webrev:
>> http://cr.openjdk.java.net/~kbarrett/8073994/webrev.00
>>
>> Testing:
>> JPRT
>> Local testing of assertion failures.
>
>
More information about the hotspot-dev
mailing list