Re: BUG #3516: Incomplete #ifdef statement in s_lock.h - Mailing list pgsql-bugs

From Tom Lane
Subject Re: BUG #3516: Incomplete #ifdef statement in s_lock.h
Date
Msg-id 19097.1186327218@sss.pgh.pa.us
Whole thread Raw
In response to BUG #3516: Incomplete #ifdef statement in s_lock.h  ("Dirk Tilger" <dirk@miriup.de>)
Responses Re: BUG #3516: Incomplete #ifdef statement in s_lock.h
List pgsql-bugs
"Dirk Tilger" <dirk@miriup.de> writes:
> Operating system:   Linux with Intel compiler on ia64

> I have been compiling postgresql 8.0, 8.1 and 8.2.4 with the Intel compiler
> in the past successfully. This time something went wrong and although I
> can't tell precisely how I triggered it, I have found a fix.

BTW, what I found in googling suggested that (1) icc never has defined
__ICC on 64-bit machines, and (2) although it does define __GNUC__ by
default, there is a way to turn that off.  So I surmise that your
relevant change was adding a compiler flag that disabled the definition
of __GNUC__.  That doesn't seem to have stopped it from accepting
GNU-style asm directives, though, so I kinda wonder what compiler
behavior does change and what was the point of your flag change.

This suggests that configure.in's check for icc is wrong/incomplete:
it only tests if the compiler was previously determined to be gcc,
ie, it defines __GNUC__.  Now that we know that can be turned off
in icc, it seems like we'd better check all the time.

            regards, tom lane

pgsql-bugs by date:

Previous
From: Tom Lane
Date:
Subject: Re: BUG #3516: Incomplete #ifdef statement in s_lock.h
Next
From: Dirk Tilger
Date:
Subject: Re: BUG #3516: Incomplete #ifdef statement in s_lock.h