This is the mail archive of the gcc@gcc.gnu.org mailing list for the GCC project.


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]
Other format: [Raw text]

Re: changing "configure" to default to "gcc -g -O2 -fwrapv ..."


> Funny you should say that, because the Ada front-end likes to do this
> transformation, rather than leaving it to the back-end.  For example:
> 
> turns into
> 
>   if ((unsigned int) ((integer) x - 10) <= 10)

The front end isn't doing this: the routine "fold" in fold-const.c is.
True, it's being *called* by the front-end, but it's very definitely
common code.

See -gnatdg if you want to know what transformations the Ada front end
if making.

> The C front-end performs this transformation too.  

See above. ;-)

> I'm not claiming that the back-end optimizers would actually do
> something sensible if the front-end didn't transform this code

I consider the optimizer that does this part of the middle-end (which
is really what you mean, not "back end").


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]