diff options
Diffstat (limited to 'gcc/cp')
-rw-r--r-- | gcc/cp/ChangeLog | 5 | ||||
-rw-r--r-- | gcc/cp/parser.c | 6 |
2 files changed, 11 insertions, 0 deletions
diff --git a/gcc/cp/ChangeLog b/gcc/cp/ChangeLog index eb54a52..4f84686 100644 --- a/gcc/cp/ChangeLog +++ b/gcc/cp/ChangeLog @@ -1,5 +1,10 @@ 2018-12-19 Segher Boessenkool <segher@kernel.crashing.org> + * parser.c (cp_parser_asm_definition) <RID_CONST, RID_RESTRICT>: Give + a more specific error message (instead of just falling through). + +2018-12-19 Segher Boessenkool <segher@kernel.crashing.org> + * parser.c (cp_parser_asm_definition): Rewrite the loop to work without "done" boolean variable. * parser.c (cp_parser_asm_definition): Keep track of the location each diff --git a/gcc/cp/parser.c b/gcc/cp/parser.c index b860fc4..c4b969c 100644 --- a/gcc/cp/parser.c +++ b/gcc/cp/parser.c @@ -19743,6 +19743,12 @@ cp_parser_asm_definition (cp_parser* parser) cp_lexer_consume_token (parser->lexer); continue; + case RID_CONST: + case RID_RESTRICT: + error_at (loc, "%qT is not an asm qualifier", token->u.value); + cp_lexer_consume_token (parser->lexer); + continue; + default: break; } |