Re: Significant oversight in that #include-removal script - Mailing list pgsql-hackers

From Martijn van Oosterhout
Subject Re: Significant oversight in that #include-removal script
Date
Msg-id 20090108203343.GA31566@svana.org
Whole thread Raw
In response to Re: Significant oversight in that #include-removal script  (Tom Lane <tgl@sss.pgh.pa.us>)
List pgsql-hackers
On Wed, Jan 07, 2009 at 05:49:12PM -0500, Tom Lane wrote:
> > It would be easy if the compiler were to have an option to throw a
> > warning when it finds a non-static variable that doesn't have a
> > corresponding extern declaration.
>
> Yeah, I think this is hopeless (or at least not worth the cost) without
> compiler support --- I was just idly wondering if newer gcc's might have
> such an option.

GNU ld has a --warn-common option which activates some warnings
relating to this. It won't check the type, but it will check the size.

It does note that this might produce spurious warnings due to
sloppiness in libraries, but it might help.

Have anice day,
--
Martijn van Oosterhout   <kleptog@svana.org>   http://svana.org/kleptog/
> Please line up in a tree and maintain the heap invariant while
> boarding. Thank you for flying nlogn airlines.

pgsql-hackers by date:

Previous
From: Heikki Linnakangas
Date:
Subject: Re: Hot standby, slot ids and stuff
Next
From: Stephen Frost
Date:
Subject: Re: New patch for Column-level privileges