aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorJan Beulich <jbeulich@novell.com>2004-08-12 09:34:16 +0000
committerJan Beulich <jbeulich@gcc.gnu.org>2004-08-12 09:34:16 +0000
commitbf5930d4970a2202ebb6f4be70ea49678ef7cd6d (patch)
tree144183fc1e50174590efd59b23c41862425f832e
parente543e219eb1865d4230278c3db3d2bedd60b1de0 (diff)
downloadgcc-bf5930d4970a2202ebb6f4be70ea49678ef7cd6d.zip
gcc-bf5930d4970a2202ebb6f4be70ea49678ef7cd6d.tar.gz
gcc-bf5930d4970a2202ebb6f4be70ea49678ef7cd6d.tar.bz2
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
-rw-r--r--gcc/cp/ChangeLog7
-rw-r--r--gcc/cp/parser.c20
-rw-r--r--gcc/testsuite/ChangeLog4
3 files changed, 17 insertions, 14 deletions
diff --git a/gcc/cp/ChangeLog b/gcc/cp/ChangeLog
index 2bc5a85..a80e8d2 100644
--- a/gcc/cp/ChangeLog
+++ b/gcc/cp/ChangeLog
@@ -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
diff --git a/gcc/cp/parser.c b/gcc/cp/parser.c
index a8854dc..2193bac 100644
--- a/gcc/cp/parser.c
+++ b/gcc/cp/parser.c
@@ -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))
diff --git a/gcc/testsuite/ChangeLog b/gcc/testsuite/ChangeLog
index 93a6e56..cf25875 100644
--- a/gcc/testsuite/ChangeLog
+++ b/gcc/testsuite/ChangeLog
@@ -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