parser.c (cp_parser_asm_definition): Properly consume scope operator tokens preceding the clobbers.

cp/
2004-08-12 Jan Beulich <jbeulich@novell.com>

	* parser.c (cp_parser_asm_definition): Properly consume scope operator
	tokens preceding the clobbers. Don't check for scope operator
	following inputs. Simplify inputs handling to match that now used for
	clobbers.

testsuite/
2004-08-12 Jan Beulich <jbeulich@novell.com>

	* g++.dg/ext/asm5.C: New.

From-SVN: r85860
This commit is contained in:
Jan Beulich 2004-08-12 09:34:16 +00:00 committed by Jan Beulich
parent e543e219eb
commit bf5930d497
3 changed files with 17 additions and 14 deletions

View File

@ -1,3 +1,10 @@
2004-08-12 Jan Beulich <jbeulich@novell.com>
* parser.c (cp_parser_asm_definition): Properly consume scope operator
tokens preceding the clobbers. Don't check for scope operator
following inputs. Simplify inputs handling to match that now used for
clobbers.
2004-08-11 Mark Mitchell <mark@codesourcery.com>
PR c++/16698

View File

@ -10367,25 +10367,18 @@ cp_parser_asm_definition (cp_parser* parser)
/* If the next token is `::', there are no outputs, and the
next token is the beginning of the inputs. */
else if (cp_lexer_next_token_is (parser->lexer, CPP_SCOPE))
{
/* Consume the `::' token. */
cp_lexer_consume_token (parser->lexer);
/* The inputs are coming next. */
inputs_p = true;
}
/* The inputs are coming next. */
inputs_p = true;
/* Look for inputs. */
if (inputs_p
|| cp_lexer_next_token_is (parser->lexer, CPP_COLON))
{
if (!inputs_p)
/* Consume the `:'. */
cp_lexer_consume_token (parser->lexer);
/* Consume the `:' or `::'. */
cp_lexer_consume_token (parser->lexer);
/* Parse the output-operands. */
if (cp_lexer_next_token_is_not (parser->lexer,
CPP_COLON)
&& cp_lexer_next_token_is_not (parser->lexer,
CPP_SCOPE)
&& cp_lexer_next_token_is_not (parser->lexer,
CPP_CLOSE_PAREN))
inputs = cp_parser_asm_operand_list (parser);
@ -10398,9 +10391,8 @@ cp_parser_asm_definition (cp_parser* parser)
if (clobbers_p
|| cp_lexer_next_token_is (parser->lexer, CPP_COLON))
{
if (!clobbers_p)
/* Consume the `:'. */
cp_lexer_consume_token (parser->lexer);
/* Consume the `:' or `::'. */
cp_lexer_consume_token (parser->lexer);
/* Parse the clobbers. */
if (cp_lexer_next_token_is_not (parser->lexer,
CPP_CLOSE_PAREN))

View File

@ -1,3 +1,7 @@
2004-08-12 Jan Beulich <jbeulich@novell.com>
* g++.dg/ext/asm5.C: New.
2004-08-11 Mark Mitchell <mark@codesourcery.com>
PR c++/16698