Commit bf5930d4 by Jan Beulich Committed by Jan Beulich

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
parent e543e219
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
......
......@@ -10367,26 +10367,19 @@ 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))
......
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
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment