Michael Paquier <michael.paquier@gmail.com> writes:
> On Sat, Apr 4, 2015 at 6:21 AM, Tom Lane <tgl@sss.pgh.pa.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