------- Additional Comments From joseph at codesourcery dot com  2005-09-09 
15:41 -------
Subject: Re:  Statement expressions issues

On Fri, 9 Sep 2005, rguenth at gcc dot gnu dot org wrote:

> No testcase?  But I think this is fixed on the mainline and only pending on 
> 4.0.
> See PR17913.

The test is gcc.dg/stmt-expr-label-*.c (modulo the exact diagnostic text) 
and I don't think this is fixed for C++ on mainline.  This is separate 
from bug 17913 where there is a case which is valid at compile time and 
invalid at runtime, involving computed gotos: 
gcc.c-torture/compile/pr17913.c, which formerly ICEd with optimization but 
was fixed not to do so (at least for C; appears fixed for C++ as well with 
the mainline/4.0 compilers I have to hand to test but they are rather 
old).  It just happens that almost all cases of bug 17913 were addressed 
for C by fixing bug 772 for C, leaving only the case of computed gotos to 
be fixed separately in 17913 (for C).

The rules for invalidity for jumps into statement expressions are much the 
same as those in C++ for jumps bypassing initializations (imagining that 
each statement expression starts with such an initialization); it might be 
possible to reuse that code to fix this bug for C++.



-- 


http://gcc.gnu.org/bugzilla/show_bug.cgi?id=772

Reply via email to