Unreachable code warning conflicts with optomisation

Yves Rutschle y.rutschle@indigovision.com
Fri Sep 26 12:01:00 GMT 2003


On Fri, Sep 26, 2003 at 01:49:23PM +0200, David Brown wrote:
> I've filled out a complete example below.  The "-Wunreachable-code" is not
> included in the -Wall flags, so it has to be specified seperately.

Indeed. I don't actually have it at all on my gcc.

> >m68k-elf-gcc -W -O2 -c test.c -o test.o -Wunreachable-code
> test.c: In function `test1':
> test.c:13: warning: will never be executed

This one should actually always turn up (unsigned can't be < 0 )

> // *******************************
> extern void sendString(char *p);
> extern void sendNewline(void);

Can we also get those 2 functions? Ideally you want to
reduce the test case to one small file, the gcc people will
appreciate that if it turns out to be a bug.

-- 
This signature left empty.


------
Want more information?  See the CrossGCC FAQ, http://www.objsw.com/CrossGCC/
Want to unsubscribe? Send a note to crossgcc-unsubscribe@sources.redhat.com



More information about the crossgcc mailing list