Re: Why is it so easy to override -fno-strict-aliasing? - Mailing list pgsql-hackers

From Andrew Dunstan
Subject Re: Why is it so easy to override -fno-strict-aliasing?
Date
Msg-id 401AAB1D.3020208@dunslane.net
Whole thread Raw
In response to Why is it so easy to override -fno-strict-aliasing?  (Tom Lane <tgl@sss.pgh.pa.us>)
List pgsql-hackers

Tom Lane wrote:

>In config/c-compiler.m4 I read
>
>if test "$ac_env_CFLAGS_set" != set; then
>  CFLAGS="$CFLAGS $pgac_cv_prog_cc_no_strict_aliasing"
>fi
>
>This means that a configure operation as innocuous-looking as
>
>    CFLAGS="-O3" ./configure
>
>will break the build on gcc >= 3.3 because it will fail to supply
>-fno-strict-aliasing.  I claim this is a lousy idea.  We should drop
>the if-test and always add -fno-strict-aliasing if the compiler
>will take it.  People who *really* know what they are doing can
>experiment with removing the switch from Makefile.global after
>configure, but I don't think it should be quite this easy to lose it.
>
>  
>

I agree.

cheers

andrew



pgsql-hackers by date:

Previous
From: Tom Lane
Date:
Subject: Why is it so easy to override -fno-strict-aliasing?
Next
From: Scott Lamb
Date:
Subject: Re: Mixing threaded and non-threaded