pgsql: Use special gcc -W flags only if we are using gcc, not if we are

Started by Bruce Momjianover 20 years ago4 messagescomitters
Jump to latest
#1Bruce Momjian
bruce@momjian.us

Log Message:
-----------
Use special gcc -W flags only if we are using gcc, not if we are using
the Intel compiler.

Jeremy Drake

Modified Files:
--------------
pgsql:
configure (r1.487 -> r1.488)
(http://developer.postgresql.org/cvsweb.cgi/pgsql/configure.diff?r1=1.487&r2=1.488)
configure.in (r1.457 -> r1.458)
(http://developer.postgresql.org/cvsweb.cgi/pgsql/configure.in.diff?r1=1.457&r2=1.458)

#2Tom Lane
tgl@sss.pgh.pa.us
In reply to: Bruce Momjian (#1)
Re: pgsql: Use special gcc -W flags only if we are using gcc, not if we are

momjian@postgresql.org (Bruce Momjian) writes:

Use special gcc -W flags only if we are using gcc, not if we are using
the Intel compiler.

I'm not entirely thrilled with this patch, because it disables not only
the -W options but also -fno-strict-aliasing. Are you sure the latter
is not needed for ICC?

regards, tom lane

#3Bruce Momjian
bruce@momjian.us
In reply to: Tom Lane (#2)
Re: pgsql: Use special gcc -W flags only if we are using

Tom Lane wrote:

momjian@postgresql.org (Bruce Momjian) writes:

Use special gcc -W flags only if we are using gcc, not if we are using
the Intel compiler.

I'm not entirely thrilled with this patch, because it disables not only
the -W options but also -fno-strict-aliasing. Are you sure the latter
is not needed for ICC?

Peter asked for specific problems with the warnings, and the submitter
produced results. I see no mention of -fno-strict-aliasing:

http://archives.postgresql.org/pgsql-patches/2006-04/msg00002.php

However, the -f flag is outside the block he modified:

# Disable strict-aliasing rules; needed for gcc 3.3+
PGAC_PROG_CC_CFLAGS_OPT([-fno-strict-aliasing])

That flag is still used for both gcc and the intel compiler, and because
he tested the patch, I assume it works for both too.

--
Bruce Momjian http://candle.pha.pa.us
EnterpriseDB http://www.enterprisedb.com

+ If your life is a hard drive, Christ can be your backup. +

#4Tom Lane
tgl@sss.pgh.pa.us
In reply to: Bruce Momjian (#3)
Re: pgsql: Use special gcc -W flags only if we are using gcc, not if we are

Bruce Momjian <pgman@candle.pha.pa.us> writes:

Tom Lane wrote:

I'm not entirely thrilled with this patch, because it disables not only
the -W options but also -fno-strict-aliasing. Are you sure the latter
is not needed for ICC?

However, the -f flag is outside the block he modified:

D'oh, I misread where the "fi" was placed. I can only plead a momentary
attack of the stupids. Never mind ...

regards, tom lane