"Sergey E. Koposov" <[EMAIL PROTECTED]> writes:
>> BTW, does ICC have any switch corresponding to gcc's -fno-strict-aliasing?
>> I see that configure tries to feed that switch to it, but it might
>> want some other spelling.
> Apparently in none of the ICC manuals -fno-strict-aliasing is described,
> but ICC accepts such flag, and produce the same code as with
> '-fno-alias' flag (described in ICC manuals).
Well, since configure.in has a separate code path for ICC anyway,
it seems like we might as well provide it the official spelling.
Any objections to a patch like this?
if test "$GCC" = yes -a "$ICC" = no; then
CFLAGS="$CFLAGS -Wall -Wmissing-prototypes -Wpointer-arith -Winline"
# These work in some but not all gcc versions
PGAC_PROG_CC_CFLAGS_OPT([-Wdeclaration-after-statement])
PGAC_PROG_CC_CFLAGS_OPT([-Wendif-labels])
# Disable strict-aliasing rules; needed for gcc 3.3+
PGAC_PROG_CC_CFLAGS_OPT([-fno-strict-aliasing])
elif test "$ICC" = yes; then
# Intel's compiler has a bug/misoptimization in checking for
# division by NAN (NaN == 0), -mp1 fixes it, so add it to the CFLAGS.
PGAC_PROG_CC_CFLAGS_OPT([-mp1])
- # Not clear if this is needed, but seems like a good idea
- PGAC_PROG_CC_CFLAGS_OPT([-fno-strict-aliasing])
+ # ICC prefers to spell the no-strict-aliasing switch like this
+ PGAC_PROG_CC_CFLAGS_OPT([-fno-alias])
elif test x"${CC}" = x"xlc"; then
# AIX xlc has to have strict aliasing turned off too
PGAC_PROG_CC_CFLAGS_OPT([-qnoansialias])
fi
regards, tom lane
---------------------------(end of broadcast)---------------------------
TIP 4: Have you searched our list archives?
http://archives.postgresql.org