PATCH RFC: -fstrict-overflow
Andrew Haley
aph@redhat.com
Wed Jan 24 17:45:00 GMT 2007
Eric Botcazou writes:
> > Basically, -fwrapv extends the language standard to say "signed
> > integers wrap." -fno-strict-overflow does not change the language
> > standard--signed overflow remains undefined--but the compiler does not
> > take advantage of that fact.
> >
> > [...]
> >
> > I would be interested in hearing other opinions as to whether
> > -fno-strict-overflow should be distinct from -fwrapv.
>
> I'm of this opinion too, the semantics of the language should not
> depend on the level of optimization, only the extent to which it is
> exploited should.
This makes good sense. With no-strict-aliasing we aren't defining a
different programming language; we're abstaining from performing
certain optimizations that result in incorrect programs doing
undesired things. It's the same with -fno-strict-overflow.
Andrew.
More information about the Gcc-patches
mailing list