+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
/* 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);
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))