[lug] g++ on FC2, turning off false warning
Scott Herod
herod at dimensional.com
Mon Jul 11 11:29:56 MDT 2005
On Mon, 11 Jul 2005, D. Stimits wrote:
> I'm not finding an answer to this, I'm not quite sure how to even look
> it up. I'm using g++ 3.3.3 on Fedora Core 2, and I have a C++ class
> where all members are private, even the destructor and
> constructors...this is intentional, it is NOT an error. g++ demands to
> give a warning. Does anyone know of a pragma or switch I can use to stop
> g++ from whining about this...without turning off real warnings? I can
> just see the emails arriving every 5 minutes to ask how to fix it.
>
> D. Stimits, stimits AT comcast DOT net
Look for the flag -Wctor-dtor-privacy in the gcc info page. The default
is to have this on. But check to see if -Wno-ctor-dtor-privacy works.
(Many of the flags are negatable.)
Scott
More information about the LUG
mailing list