mirror of
git://gcc.gnu.org/git/gcc.git
synced 2025-03-08 10:57:12 +08:00
parser.c (cp_parser_asm_definition): Correct handling of omitted operands.
* parser.c (cp_parser_asm_definition): Correct handling of omitted operands. * g++.dg/ext/asm4.C: New test. From-SVN: r61048
This commit is contained in:
parent
918c4fe41e
commit
8caf4c38d8
@ -1,3 +1,8 @@
|
||||
2003-01-07 Mark Mitchell <mark@codesourcery.com>
|
||||
|
||||
* parser.c (cp_parser_asm_definition): Correct handling of omitted
|
||||
operands.
|
||||
|
||||
2003-01-08 Kriang Lerdsuwanakij <lerdsuwa@users.sourceforge.net>
|
||||
|
||||
PR c++/9030
|
||||
|
@ -9592,7 +9592,9 @@ cp_parser_asm_definition (parser)
|
||||
if (cp_lexer_next_token_is_not (parser->lexer,
|
||||
CPP_COLON)
|
||||
&& cp_lexer_next_token_is_not (parser->lexer,
|
||||
CPP_SCOPE))
|
||||
CPP_SCOPE)
|
||||
&& cp_lexer_next_token_is_not (parser->lexer,
|
||||
CPP_CLOSE_PAREN))
|
||||
outputs = cp_parser_asm_operand_list (parser);
|
||||
}
|
||||
/* If the next token is `::', there are no outputs, and the
|
||||
@ -9616,7 +9618,9 @@ cp_parser_asm_definition (parser)
|
||||
if (cp_lexer_next_token_is_not (parser->lexer,
|
||||
CPP_COLON)
|
||||
&& cp_lexer_next_token_is_not (parser->lexer,
|
||||
CPP_SCOPE))
|
||||
CPP_SCOPE)
|
||||
&& cp_lexer_next_token_is_not (parser->lexer,
|
||||
CPP_CLOSE_PAREN))
|
||||
inputs = cp_parser_asm_operand_list (parser);
|
||||
}
|
||||
else if (cp_lexer_next_token_is (parser->lexer, CPP_SCOPE))
|
||||
@ -9631,7 +9635,9 @@ cp_parser_asm_definition (parser)
|
||||
/* Consume the `:'. */
|
||||
cp_lexer_consume_token (parser->lexer);
|
||||
/* Parse the clobbers. */
|
||||
clobbers = cp_parser_asm_clobber_list (parser);
|
||||
if (cp_lexer_next_token_is_not (parser->lexer,
|
||||
CPP_CLOSE_PAREN))
|
||||
clobbers = cp_parser_asm_clobber_list (parser);
|
||||
}
|
||||
}
|
||||
/* Look for the closing `)'. */
|
||||
|
@ -1,3 +1,7 @@
|
||||
2003-01-07 Mark Mitchell <mark@codesourcery.com>
|
||||
|
||||
* g++.dg/ext/asm4.C: New test.
|
||||
|
||||
2003-01-08 Kriang Lerdsuwanakij <lerdsuwa@users.sourceforge.net>
|
||||
|
||||
PR c++/9030
|
||||
|
4
gcc/testsuite/g++.dg/ext/asm4.C
Normal file
4
gcc/testsuite/g++.dg/ext/asm4.C
Normal file
@ -0,0 +1,4 @@
|
||||
void f ()
|
||||
{
|
||||
__asm__ __volatile__ ("" : : );
|
||||
}
|
Loading…
Reference in New Issue
Block a user