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: vincent+gcc at vinc17 dot org
- 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
- Date: Sun, 31 Dec 2006 10:24:28 EST
- Subject: Re: changing "configure" to default to "gcc -g -O2 -fwrapv ..."
- References: <200612310042.kBV0g5pt027400@localhost.localdomain> <45970D3D.1090700@adacore.com> <20061231120933.GS32297@ay.vinc17.org> <4597B5F0.5050504@adacore.com> <20061231140332.GT32297@ay.vinc17.org> <4597C79E.5020507@adacore.com> <20061231150859.GX32297@ay.vinc17.org>
> Doing that in unsigned arithmetic is much more readable anyway.
If you're concerned about readability, you leave it as the two tests and
let the compiler worry about the optimal way to implement it.
> So I doubt that programmers would do that in signed arithmetic.
I kind of doubt that as well, but for a different reason: this is a trick
that isn't that widely known and I'd guess (again with no data) that the
people who know about it know to do it correctly.