diff options
author | Jakub Jelinek <jakub@redhat.com> | 2008-08-20 17:50:23 +0200 |
---|---|---|
committer | Jakub Jelinek <jakub@gcc.gnu.org> | 2008-08-20 17:50:23 +0200 |
commit | 5dc4a7f44c935041908f1f0b1c45e191d6d0a532 (patch) | |
tree | 29bacd4e39261b738d933dbede953fe1987c6824 /gcc/c-parser.c | |
parent | 235f4375ba4542ab13ea4d54d731ba599076331f (diff) | |
download | gcc-5dc4a7f44c935041908f1f0b1c45e191d6d0a532.tar.gz |
re PR c/37171 (Canonical spelling optimization dependency)
PR c/37171
* c-parser.c (c_parser_attributes): For keywords use canonical
spelling for attr_name.
* gcc.dg/pr37171.c: New test.
* g++.dg/ext/attrib34.C: New test.
From-SVN: r139317
Diffstat (limited to 'gcc/c-parser.c')
-rw-r--r-- | gcc/c-parser.c | 7 |
1 files changed, 6 insertions, 1 deletions
diff --git a/gcc/c-parser.c b/gcc/c-parser.c index ccec6602107..e2b1303cddd 100644 --- a/gcc/c-parser.c +++ b/gcc/c-parser.c @@ -2828,8 +2828,13 @@ c_parser_attributes (c_parser *parser) } if (!ok) break; + /* Accept __attribute__((__const)) as __attribute__((const)) + etc. */ + attr_name + = ridpointers[(int) c_parser_peek_token (parser)->keyword]; } - attr_name = c_parser_peek_token (parser)->value; + else + attr_name = c_parser_peek_token (parser)->value; c_parser_consume_token (parser); if (c_parser_next_token_is_not (parser, CPP_OPEN_PAREN)) { |