[Date Prev][Date Next] [Thread Prev][Thread Next] [Date Index] [Thread Index]

Bug#372913: gcc-4.1: datatype limits / signedness differs with optimization levels



Erik Meusel wrote:
> Am Montag, 12. Juni 2006 18:24 schrieb Bastian Blank:
> > char is neither signed nor unsigned. Only unsigned have defined overflow
> > behaviour.
> >
> > >         } while (c != '\0');
> > >
> > >         return 0;
> > > }
> 
> Alright, but why does this work differently using different versions of gcc or 
> different optimization levels?

For undefined behaviour, the compiler is free to change its mind as it likes.


Thiemo




Reply to: