Re: Compile warnings on OSX 10.10 clang 6.0

From: John Gorman <johngorman2(at)gmail(dot)com>
To: Tom Lane <tgl(at)sss(dot)pgh(dot)pa(dot)us>
Cc: Peter Eisentraut <peter_e(at)gmx(dot)net>, pgsql-hackers <pgsql-hackers(at)postgresql(dot)org>
Subject: Re: Compile warnings on OSX 10.10 clang 6.0
Date: 2015-04-03 21:51:52
Message-ID: CALkS6B8XsifXK1K33mKF7Lxq6-=Y0-aN4MyWYqbwhXnoT6Mmiw@mail.gmail.com
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-hackers

I have confirmed that "-Wno-unused-command-line-argument"
suppresses the "-pthread" warning for clang 6.0 and does not
trigger a warning in gcc 4.9.

Works for me!

John

On Fri, Apr 3, 2015 at 5:21 PM, Tom Lane <tgl(at)sss(dot)pgh(dot)pa(dot)us> wrote:

> I wrote:
> > Peter Eisentraut <peter_e(at)gmx(dot)net> writes:
> >> 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.
>
> On the other hand, there's often more than one way to skin a cat.
> 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?
>
> regards, tom lane
>

In response to

Browse pgsql-hackers by date

  From Date Subject
Next Message Noah Misch 2015-04-04 00:32:08 Re: Sloppy SSPI error reporting code
Previous Message Tom Lane 2015-04-03 21:45:56 Re: Abbreviated keys for Numeric