[lug] g++ on FC2, turning off false warning

D. Stimits stimits at comcast.net
Mon Jul 11 19:56:49 MDT 2005


...

>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.)
>  
>

I believe this is the one, but as it turns out, I won't be needing it. 
What I've been doing is checking for compile warnings on FC2 and FC4 for 
a friend writing some cross-platform code. This code was running without 
warning on FC3 on his machine, as well as a current VC windows compiler. 
I ended up asking him about this, and although the code runs and 
validates even with warnings on every platform (well, not all warned), 
this was a mass search/replace typo. He had replaced a lot of structs 
with classes, and got carried away...those classes were actually 
intended to be structs. Which of course fixes that warning!

D. Stimits, stimits AT comcast DOT net

PS: It's amazing that code can compile and run on both win and linux in C++!



More information about the LUG mailing list