Commit ca059043 by Andrew Pinski Committed by Andrew Pinski

parser.c (cp_parser_asm_definition): Look passed the CLEANUP_POINT_EXPR to get the asm expression.

cp/ChangeLog:
	* parser.c (cp_parser_asm_definition): Look passed the
	CLEANUP_POINT_EXPR to get the asm expression.

testsuite/ChangeLog:
	* g++.dg/ext/asm6.C: Remove extraneous semicolon.

From-SVN: r88688
parent 93348822
2004-10-05 Andrew Pinski <pinskia@physics.uc.edu> 2004-10-07 Andrew Pinski <pinskia@physics.uc.edu>
* parser.c (cp_parser_asm_definition): Look passed the
CLEANUP_POINT_EXPR to get the asm expression.
2004-10-06 Andrew Pinski <pinskia@physics.uc.edu>
PR c++/17368 PR c++/17368
* semantics.c (finish_asm_stmt): Asm expressions need cleanup * semantics.c (finish_asm_stmt): Asm expressions need cleanup
......
...@@ -10389,7 +10389,13 @@ cp_parser_asm_definition (cp_parser* parser) ...@@ -10389,7 +10389,13 @@ cp_parser_asm_definition (cp_parser* parser)
inputs, clobbers); inputs, clobbers);
/* If the extended syntax was not used, mark the ASM_EXPR. */ /* If the extended syntax was not used, mark the ASM_EXPR. */
if (!extended_p) if (!extended_p)
ASM_INPUT_P (asm_stmt) = 1; {
tree temp = asm_stmt;
if (TREE_CODE (temp) == CLEANUP_POINT_EXPR)
temp = TREE_OPERAND (temp, 0);
ASM_INPUT_P (temp) = 1;
}
} }
else else
assemble_asm (string); assemble_asm (string);
......
2004-10-07 Andrew Pinski <pinskia@physics.uc.edu>
* g++.dg/ext/asm6.C: Remove extraneous semicolon.
2004-10-07 Giovanni Bajo <giovannibajo@gcc.gnu.org> 2004-10-07 Giovanni Bajo <giovannibajo@gcc.gnu.org>
PR c++/17115 PR c++/17115
......
...@@ -7,5 +7,5 @@ void bar() ...@@ -7,5 +7,5 @@ void bar()
{ {
A a; A a;
asm("" : : "r"(foo(a)) );//<-- cleanup needed here. asm("" : : "r"(foo(a)) );//<-- cleanup needed here.
}; }
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