summaryrefslogtreecommitdiff
path: root/gcc/c-parser.c
diff options
context:
space:
mode:
authorjakub <jakub@138bc75d-0d04-0410-961f-82ee72b054a4>2009-04-01 13:32:22 +0000
committerjakub <jakub@138bc75d-0d04-0410-961f-82ee72b054a4>2009-04-01 13:32:22 +0000
commit0930c6941290ddc1a387a7850379d43035f34d22 (patch)
tree08ff9013ac51f3577a317f758fd39f710527edf1 /gcc/c-parser.c
parentc9b099a225d47a363d13605c18d65f41d26f8e26 (diff)
downloadgcc-0930c6941290ddc1a387a7850379d43035f34d22.tar.gz
PR c/37772
* c-parser.c (c_parser_asm_statement): Skip until close paren and return if c_parser_asm_string_literal returned NULL. * gcc.dg/pr37772.c: New test. * g++.dg/ext/asm11.C: New test. git-svn-id: svn+ssh://gcc.gnu.org/svn/gcc/trunk@145401 138bc75d-0d04-0410-961f-82ee72b054a4
Diffstat (limited to 'gcc/c-parser.c')
-rw-r--r--gcc/c-parser.c6
1 files changed, 6 insertions, 0 deletions
diff --git a/gcc/c-parser.c b/gcc/c-parser.c
index 03a7194a864..1be2ae5a5bc 100644
--- a/gcc/c-parser.c
+++ b/gcc/c-parser.c
@@ -4193,6 +4193,12 @@ c_parser_asm_statement (c_parser *parser)
return NULL_TREE;
}
str = c_parser_asm_string_literal (parser);
+ if (str == NULL_TREE)
+ {
+ parser->lex_untranslated_string = false;
+ c_parser_skip_until_found (parser, CPP_CLOSE_PAREN, NULL);
+ return NULL_TREE;
+ }
if (c_parser_next_token_is (parser, CPP_CLOSE_PAREN))
{
simple = true;