optimization/9675: store-and-increment becomes increment-and-store

Richard Earnshaw rearnsha@arm.com
Thu Feb 13 09:41:00 GMT 2003


> On 12 Feb 2003 18:54:38 -0000, rearnsha@gcc.gnu.org wrote regarding "Re: optimization/9675:
> store-and-increment becomes increment-and-store"
> 
> I'm informing myself a bit more about the undefined issue (the expr. uses the pointed-to value but increments the pointer). HOWEVER, it may interest you to know that if you modify downcase() to 
> 
> void downcase( char *s )
> { char c;
>    while( *s ){
> 		c= *s;
> 		*s++= tolower( c );
> 	}
> }
> 
> the coredump issue remains (using compilation as shown in coredumps.log). According to your reply, the above does not contain undefined statements, and -Wsequence-point doesn't complain about any.
> 

The code above is ok.  Are you trying to downcase a string literal?

R.



More information about the Gcc-bugs mailing list