[Committed] Fix PR c/27489 and c/27490 compound expression and parse error

Andrew Pinski pinskia@physics.uc.edu
Tue Aug 15 03:46:00 GMT 2006


The problem here is that when we have a parse error (error_mark_node)
for a compound expression, we create a compound expression still instead
just returning error_mark_node.  This fixes the problem by just
returning error_mark_node instead of letting the other parts of the
front-end dealing with compound expression having error_mark_node in it.


Applied to the mainline as approved by JSM in PR 27489.
I will apply this to the 4.1 branch in about a week also.

Thanks,
Andrew Pinski

ChangeLog:
	* c-typeck.c (build_compound_expr): If the second expression
	is an error mark, then just return an error mark instead of
	creating a COMPOUND_EXPR.

testsuite/ChangeLog:
	* gcc.dg/sizeof-2.c: New testcase.
	* gcc.dg/switch-A.c: New testcase.

-------------- next part --------------
A non-text attachment was scrubbed...
Name: fix27490_27489.diff.txt
Type: text/x-patch
Size: 1074 bytes
Desc: not available
URL: <http://gcc.gnu.org/pipermail/gcc-patches/attachments/20060815/556a38b4/attachment.bin>


More information about the Gcc-patches mailing list