aboutsummaryrefslogtreecommitdiff
path: root/gcc/c
diff options
context:
space:
mode:
authorMarek Polacek <polacek@redhat.com>2013-10-24 10:42:43 +0000
committerMarek Polacek <mpolacek@gcc.gnu.org>2013-10-24 10:42:43 +0000
commitf28aa681d399c174527abd917afe15a3174a401e (patch)
tree940e59e6e12042dadc381f6e206c11785d7ff06d /gcc/c
parent54c09437d1f90441f562140d4c0dfd2598bb9722 (diff)
downloadgcc-f28aa681d399c174527abd917afe15a3174a401e.zip
gcc-f28aa681d399c174527abd917afe15a3174a401e.tar.gz
gcc-f28aa681d399c174527abd917afe15a3174a401e.tar.bz2
c-parser.c (c_parser_struct_declaration): Add a comment.
c/ * c-parser.c (c_parser_struct_declaration): Add a comment. (c_parser_declarator): Don't allow _Alignas here. testsuite/ * gcc.dg/c1x-align-5.c: Add more testing. From-SVN: r204007
Diffstat (limited to 'gcc/c')
-rw-r--r--gcc/c/ChangeLog5
-rw-r--r--gcc/c/c-parser.c7
2 files changed, 11 insertions, 1 deletions
diff --git a/gcc/c/ChangeLog b/gcc/c/ChangeLog
index 39cce3b..1d0dd95 100644
--- a/gcc/c/ChangeLog
+++ b/gcc/c/ChangeLog
@@ -1,3 +1,8 @@
+2013-10-24 Marek Polacek <polacek@redhat.com>
+
+ * c-parser.c (c_parser_struct_declaration): Add a comment.
+ (c_parser_declarator): Don't allow _Alignas here.
+
2013-10-17 Andrew MacLeod <amacleod@redhat.com>
* c-parser.c: Include omp-low.h.
diff --git a/gcc/c/c-parser.c b/gcc/c/c-parser.c
index 9b6abe0e..4d6c930 100644
--- a/gcc/c/c-parser.c
+++ b/gcc/c/c-parser.c
@@ -2645,6 +2645,11 @@ c_parser_struct_declaration (c_parser *parser)
}
specs = build_null_declspecs ();
decl_loc = c_parser_peek_token (parser)->location;
+ /* Strictly by the standard, we shouldn't allow _Alignas here,
+ but it appears to have been intended to allow it there, so
+ we're keeping it as it is until WG14 reaches a conclusion
+ of N1731.
+ <http://www.open-std.org/jtc1/sc22/wg14/www/docs/n1731.pdf> */
c_parser_declspecs (parser, specs, false, true, true,
true, cla_nonabstract_decl);
if (parser->error)
@@ -2959,7 +2964,7 @@ c_parser_declarator (c_parser *parser, bool type_seen_p, c_dtr_syn kind,
struct c_declarator *inner;
c_parser_consume_token (parser);
c_parser_declspecs (parser, quals_attrs, false, false, true,
- true, cla_prefer_id);
+ false, cla_prefer_id);
inner = c_parser_declarator (parser, type_seen_p, kind, seen_id);
if (inner == NULL)
return NULL;