This is the mail archive of the
gcc@gcc.gnu.org
mailing list for the GCC project.
Re: changing "configure" to default to "gcc -g -O2 -fwrapv ..."
- From: kenner at vlsi1 dot ultra dot nyu dot edu (Richard Kenner)
- To: duncan dot sands at math dot u-psud dot fr
- Cc: autoconf-patches at gnu dot org, bernds_cb1 at t-online dot de, bug-gnulib at gnu dot org, dewar at adacore dot com, ebb9 at byu dot net, eggert at cs dot ucla dot edu, gcc at gcc dot gnu dot org, gdr at integrable-solutions dot net, pinskia at physics dot uc dot edu, richard dot guenther at gmail dot com, vincent+gcc at vinc17 dot org
- Date: Sun, 31 Dec 2006 13:18:35 EST
- Subject: Re: changing "configure" to default to "gcc -g -O2 -fwrapv ..."
- References: <200612310042.kBV0g5pt027400@localhost.localdomain> <20061231144821.GW32297@ay.vinc17.org> <10612311520.AA25136@vlsi1.ultra.nyu.edu> <200612311752.26193.duncan.sands@math.u-psud.fr>
> 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").