From: | Tom Lane <tgl(at)sss(dot)pgh(dot)pa(dot)us> |
---|---|
To: | Michael Paquier <michael(dot)paquier(at)gmail(dot)com> |
Cc: | Peter Eisentraut <peter_e(at)gmx(dot)net>, John Gorman <johngorman2(at)gmail(dot)com>, pgsql-hackers <pgsql-hackers(at)postgresql(dot)org> |
Subject: | Re: Compile warnings on OSX 10.10 clang 6.0 |
Date: | 2015-04-04 14:57:41 |
Message-ID: | 31316.1428159461@sss.pgh.pa.us |
Views: | Raw Message | Whole Thread | Download mbox | Resend email |
Thread: | |
Lists: | pgsql-hackers |
Michael Paquier <michael(dot)paquier(at)gmail(dot)com> writes:
> On Sat, Apr 4, 2015 at 6:21 AM, Tom Lane <tgl(at)sss(dot)pgh(dot)pa(dot)us> wrote:
>> It occurred to me that maybe we could just turn off this class of warning,
>> and after some experimentation I found out that
>> "-Wno-unused-command-line-argument" does that, at least in the version
>> of clang that Apple's currently shipping.
>>
>> Who's for enabling that if the compiler takes it?
> Yes, please. I always found those pthread warnings annoying.
After a bit more experimentation I found out that for both gcc and clang
(at least in the versions I'm using, on RHEL6 and Yosemite), you can
write "-Wno-anythingatall" and the compiler will not complain about it.
(And how did *that* get by the bozo who put in this warning, I wonder.)
So that means that if we just add the obvious test
PGAC_PROG_CC_CFLAGS_OPT([-Wno-unused-command-line-argument])
then we will end up including that in CFLAGS on pretty much every
platform, whether or not there's an actual problem to solve.
gcc *does* complain about -Wunused-command-line-argument, so a possible
answer is to test for that and then add the other to CFLAGS. That seems
kinda grotty though, does anyone have another way?
regards, tom lane
From | Date | Subject | |
---|---|---|---|
Next Message | sudalai | 2015-04-04 19:24:54 | File count restriction of directory limits number of relations inside a database. |
Previous Message | Petr Jelinek | 2015-04-04 14:55:01 | Re: TABLESAMPLE patch |