[Bug middle-end/4210] should not warning with dead code

joseph at codesourcery dot com gcc-bugzilla@gcc.gnu.org
Wed Mar 1 23:01:00 GMT 2006



------- Comment #13 from joseph at codesourcery dot com  2006-03-01 23:01 -------
Subject: Re:  should not warning with dead code

A workaround is to use ? : and statement expressions instead of "if".  
This way, the front-end setting of skip_evaluation disables these 
warnings.  (skip_evaluation can't be set for if (0) because you can jump 
into if (0), whereas jumps into statement expressions are not permitted.  
Thus in general you need to parse the whole function body to tell if the 
if (0) is dead.)


-- 


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



More information about the Gcc-bugs mailing list