This is the mail archive of the
gcc@gcc.gnu.org
mailing list for the GCC project.
Re: GCC optimizes integer overflow: bug or feature?
- From: Robert Dewar <dewar at adacore dot com>
- To: Dave Korn <dave dot korn at artimi dot com>
- Cc: 'Andrew Pinski' <pinskia at physics dot uc dot edu>, 'Paul Brook' <paul at codesourcery dot com>, gcc at gcc dot gnu dot org, 'Denis Vlasenko' <vda dot linux at googlemail dot com>, 'Andrew Haley' <aph at redhat dot com>, 'Paolo Bonzini' <bonzini at gnu dot org>, bug-gnulib at gnu dot org
- Date: Tue, 19 Dec 2006 22:28:17 -0500
- Subject: Re: GCC optimizes integer overflow: bug or feature?
- References: <006601c723df$49a75250$a501a8c0@CAM.ARTIMI.COM>
Dave Korn wrote:
Why isn't that just a buggy program with wilful disregard for the use of
correct synchronisation techniques?
Right, I think most people would agree it is.
But for sure, if you consider that making the code go faster is itself
a change in behavior, then obviously all optimization changes the
behavior, but so does any improvement in the compiler in terms of
the unoptimized code generated.
cheers,
DaveK