aboutsummaryrefslogtreecommitdiff
path: root/gcc/c/c-parser.c
diff options
context:
space:
mode:
authorJakub Jelinek <jakub@redhat.com>2021-08-12 09:09:39 +0200
committerJakub Jelinek <jakub@redhat.com>2021-08-12 09:34:16 +0200
commit3890c28ac5bd03ba334a20fbf9518a37dcdbfe5d (patch)
treec0a6bd0d91ec9e3b4e1890f30ab3f67cea95a467 /gcc/c/c-parser.c
parent2bdf17de1d0ad7a75d3474e672a3a2110919862f (diff)
downloadgcc-3890c28ac5bd03ba334a20fbf9518a37dcdbfe5d.zip
gcc-3890c28ac5bd03ba334a20fbf9518a37dcdbfe5d.tar.gz
gcc-3890c28ac5bd03ba334a20fbf9518a37dcdbfe5d.tar.bz2
c++: Fix up parsing of attributes for using-directive
As I've said earlier and added xfails in gen-attrs-76.C test, https://eel.is/c++draft/namespace.udir#nt:using-directive has attribute-specifier-seq[opt] at the start, not at the end before ; as gcc is expecting. IMHO we should continue parsing at the end the GNU attributes because using namespace N __attribute__((strong));, while not supported anymore, used to be supported in the past, but my code searches for using namespace N [[gnu::strong]]; didn't reveal anything at all. 2021-08-12 Jakub Jelinek <jakub@redhat.com> * parser.c (cp_parser_block_declaration): Call cp_parser_using_directive for C++11 attributes followed by using namespace tokens. (cp_parser_using_directive): Parse C++11 attributes at the start of the directive rather than at the end, only parse GNU attributes at the end. * g++.dg/lookup/strong-using.C: Add test using [[gnu::strong]] as well. * g++.dg/lookup/strong-using2.C: Likewise. * g++.dg/cpp0x/gen-attrs-58.C: Move alignas(int) before using namespace. * g++.dg/cpp0x/gen-attrs-59.C: Move alignas(X) before using namespace, add tests for alignas before semicolon. * g++.dg/cpp0x/gen-attrs-76.C: Remove xfails. Add test for C++11 attributes on using directive before semicolon.
Diffstat (limited to 'gcc/c/c-parser.c')
0 files changed, 0 insertions, 0 deletions