[PATCH] c++/58109 - alignas() fails to compile with constant expression

Martin Sebor msebor@gmail.com
Wed Jan 20 23:04:00 GMT 2016


> Right.  The problem is this code in is_late_template_attribute:
>
>>       /* If the first attribute argument is an identifier, only consider
>>          second and following arguments.  Attributes like mode, format,
>>          cleanup and several target specific attributes aren't late
>>          just because they have an IDENTIFIER_NODE as first argument.  */
>>       if (arg == args && identifier_p (t))
>>         continue;
>
> It shouldn't skip an initial identifier if !attribute_takes_identifier_p.

That seems backwards. I expected attribute_takes_identifier_p()
to return true for attribute aligned since the attribute does
take one.

In any case, I changed the patch as you suggest and retested it
on x86_64.  I saw the email about stage 3 having ended but I'm
not sure it applies to changes that are still in progress.

Martin
-------------- next part --------------
A non-text attachment was scrubbed...
Name: gcc-58109.patch
Type: text/x-patch
Size: 3604 bytes
Desc: not available
URL: <http://gcc.gnu.org/pipermail/gcc-patches/attachments/20160120/d51df9af/attachment.bin>


More information about the Gcc-patches mailing list