This is the mail archive of the
insight@sourceware.org
mailing list for the Insight project.
Partial Patch: anti-aliasing optimizations are a pain, but we're here now
- From: "Bruce Korb" <bruce dot korb at gmail dot com>
- To: insight at sourceware dot org
- Date: Sat, 25 Nov 2006 19:36:29 -0800
- Subject: Partial Patch: anti-aliasing optimizations are a pain, but we're here now
- References: <4568BA0A.60509@gmail.com> <036d01c710f6$d96ae8d0$a501a8c0@CAM.ARTIMI.COM> <668c430c0611251933r76e6c8d1m62753a125d9e8bf7@mail.gmail.com>
On 11/25/06, Dave Korn <dave.korn@artimi.com> wrote:
On 25 November 2006 21:48, Bruce Korb wrote:
> This patch is important, by the way, as GCC reserves the right to
> permute code
> that causes problems if you do not alias pointers with unions. .....
I really think you misunderstand: the compiler already does do *exactly*
that: just choose -O0, and it will assume that anything could potentially
alias with anything else. The reason it doesn't do that at other -O levels is
because it makes for lousy codegen.
Hi Dave,
I know that. The default configure is for -O2. My preference
is to not have to remember, "Oh, yes, this is interactive, so
I have to specify ``CFLAGS=-g''." But, you are right, another
fix is to ensure that the insight package defaults to a -O build.
So, please, either change the code, specify -fno-strict-aliasing or
force optimization of -O0. Please do not ask your clients (me :) to
remember I have to configure your package specially. Thank you!
Regards, Bruce
P.S. I have this in my configure.ac file. Note the last entry:
case "$GCC" in
yes)
CFLAGS=`echo $CFLAGS -Wall -Werror -Wcast-align -Wconversion \
-Wmissing-prototypes -Wpointer-arith -Wshadow \
-Wstrict-prototypes -Wwrite-strings -fno-strict-aliasing`
;;
esac