Re: Compile warnings on OSX 10.10 clang 6.0 - Mailing list pgsql-hackers

From Tom Lane
Subject Re: Compile warnings on OSX 10.10 clang 6.0
Date
Msg-id 1600.1428094914@sss.pgh.pa.us
Whole thread Raw
In response to Re: Compile warnings on OSX 10.10 clang 6.0  (Peter Eisentraut <peter_e@gmx.net>)
Responses Re: Compile warnings on OSX 10.10 clang 6.0
List pgsql-hackers
Peter Eisentraut <peter_e@gmx.net> writes:
> On 4/3/15 4:02 PM, John Gorman wrote:
>> I am getting compile warnings on OSX 10.10 from clang 6.0:
>> 
>> clang: warning: argument unused during compilation: '-pthread'
>> 
>> The 5 warnings are where we are making a -dynamiclib and
>> the -pthread argument is not necessary:
>> 
>> ./src/interfaces/libpq/
>> ./src/interfaces/ecpg/pgtypeslib/
>> ./src/interfaces/ecpg/ecpglib/
>> ./src/interfaces/ecpg/compatlib/
>> ./src/interfaces/ecpg/preproc/
>> 
>> This is interfering with using "-Wall -Werror" to catch warnings.
>> 
>> Any opinions as to whether this is worth fixing and if so
>> what the cleanest approach might be?

> These warnings also happen with older versions of clang.  Now idea how
> to fix yet.  I'm thinking that clang should be fixed, because these
> warnings are stupid.

Yeah, they're utterly stupid; whoever put them in obviously doesn't
have a clue about typical Makefile construction.  I wonder if next
we'll see complaints about unnecessary -D or -I switches.

Having said that, I did look awhile ago about how we might get rid of
them, and it seems not easy; for starters we would need to drop the
assumption that CFLAGS can always be included when linking.  Also,
AFAICT -pthread sometimes *is* required when linking; so it's
not even very obvious when to suppress the switch, even if we could
do so without wholesale rearrangement of our FLAGS handling.
        regards, tom lane



pgsql-hackers by date:

Previous
From: Tom Lane
Date:
Subject: Re: Unused variable in hashpage.c
Next
From: Tom Lane
Date:
Subject: Re: Compile warnings on OSX 10.10 clang 6.0