diff options
author | Dodji Seketeli <dodji@redhat.com> | 2012-10-31 08:55:43 +0000 |
---|---|---|
committer | Dodji Seketeli <dodji@gcc.gnu.org> | 2012-10-31 09:55:43 +0100 |
commit | e82b2e880c2a70ac8dbcb6c36df0e89c92207e60 (patch) | |
tree | 61626b5c962af926be3f6e96b3f80958e0255a68 /libiberty/objalloc.c | |
parent | d578e863b08e64789f767c95f85acd10dc477bdf (diff) | |
download | gcc-e82b2e880c2a70ac8dbcb6c36df0e89c92207e60.tar.gz |
PR c++/54955 - Fail to parse alignas expr at the beginning of a declaration
In this PR, g++ embarrassingly fails to parse the simple alignas
expression below:
alignas(double) int f;
even though the simple-declaration production in Clause 7 suggests
otherwise.
Fixed thus and tested on x86_64-unknown-linux-gnu against trunk.
gcc/cp
PR c++/54955
* parser.c (cp_nth_tokens_can_be_std_attribute_p): Recognize the
'Alignas' keyword as the beginning of a c++11 attribute specifier.
Update the comment of the function.
(cp_next_tokens_can_be_gnu_attribute_p): Update the comment of the
function.
gcc/testsuite/
PR c++/54955
* g++.dg/cpp0x/gen-attrs-48-2.C: New test.
From-SVN: r193029
Diffstat (limited to 'libiberty/objalloc.c')
0 files changed, 0 insertions, 0 deletions