This is the mail archive of the
mailing list for the GCC project.
Re: changing "configure" to default to "gcc -g -O2 -fwrapv ..."
- From: Gabriel Dos Reis <gdr at integrable-solutions dot net>
- To: Ian Lance Taylor <iant at google dot com>
- Cc: Paul Eggert <eggert at CS dot UCLA dot EDU>, autoconf-patches at gnu dot org, bug-gnulib at gnu dot org, gcc at gcc dot gnu dot org
- Date: 01 Jan 2007 10:34:30 +0100
- Subject: Re: changing "configure" to default to "gcc -g -O2 -fwrapv ..."
- References: <200612300047.kBU0lFwk014817@localhost.localdomain> <email@example.com> <10612302258.AA24598@vlsi1.ultra.nyu.edu> <firstname.lastname@example.org> <email@example.com> <firstname.lastname@example.org> <email@example.com> <firstname.lastname@example.org> <email@example.com> <firstname.lastname@example.org> <email@example.com> <firstname.lastname@example.org> <email@example.com>
Ian Lance Taylor <firstname.lastname@example.org> writes:
| I believe the best option is
| going to be to take an case by case approach to selecting which
| optimizations should be enabled by default, and which optimizations
| should not be done except via a special extra option (by which I mean
| not a -O option, but a -f option).
| I appreciate your need to move this discussion along, but I'm not
| entirely happy with what I take to be stampeding it by introducing
| what I believe would be a completely inappropriate patch to autoconf,
| rather than, say, opening a gcc bugzilla problem report for the cases
| you feel gcc should handle differently.
I see the Autoconf patch proposal as another option on the table; I don't
believe it is the only one. As I said in a previous message, *if it
is infeasible to convince GCC that not all undefined behaviour are
equal*, then I support Paul's proposal as the way to move forward.
I do hope your and Richard G's constructive search for middle ground
will find echoes within the middle-end maintainers.
Although I cannot speak for Paul, I have the feeling a recognition of
existing practice by GCC and an action to accept and generate
reasonable codes for "unreasonable" codes that assume wrapping
semantics will satisfy him. Of course, it is not easy to define
precisely "unreasonable"; but if people, for a moment, insist less on
labeling the discussion with individuals we may make good progress.
| I already took the time to go through all the cases for which gcc
| relies on signed overflow being undefined. I also sent a very
| preliminary patch providing warnings for those cases. I believe that
| we will get the best results along those lines, not by introducing an
| autoconf patch.
I do appreciate your preliminary patch -- and I'm sure Paul find it
useful too, as tool to advance in this discussion. I suspect that,
what is not clear is whether "the other side" (I hate that expression)
is amenable to agreeing on that course or whether the seemingly
prevalent attitude "but it is undefined; but it is not C" is the
opinion of the majority of middle-end maintainers.