aboutsummaryrefslogtreecommitdiff
path: root/gcc/c
diff options
context:
space:
mode:
Diffstat (limited to 'gcc/c')
-rw-r--r--gcc/c/ChangeLog5
-rw-r--r--gcc/c/c-parser.c6
2 files changed, 11 insertions, 0 deletions
diff --git a/gcc/c/ChangeLog b/gcc/c/ChangeLog
index 52b2c65..6e12dda 100644
--- a/gcc/c/ChangeLog
+++ b/gcc/c/ChangeLog
@@ -1,5 +1,10 @@
2018-12-19 Segher Boessenkool <segher@kernel.crashing.org>
+ * c-parser.c (c_parser_asm_statement) <RID_CONST, RID_RESTRICT>: Give
+ a more specific error message (instead of just falling through).
+
+2018-12-19 Segher Boessenkool <segher@kernel.crashing.org>
+
* c-parser.c (c_parser_asm_statement): Keep track of the location each
asm qualifier is first seen; use that to give nicer "duplicate asm
qualifier" messages. Delete 'quals" variable, instead pass the
diff --git a/gcc/c/c-parser.c b/gcc/c/c-parser.c
index 652e53c..0def497 100644
--- a/gcc/c/c-parser.c
+++ b/gcc/c/c-parser.c
@@ -6411,6 +6411,12 @@ c_parser_asm_statement (c_parser *parser)
c_parser_consume_token (parser);
continue;
+ case RID_CONST:
+ case RID_RESTRICT:
+ error_at (loc, "%qE is not an asm qualifier", token->value);
+ c_parser_consume_token (parser);
+ continue;
+
default:
break;
}