On 11/22/10 12:59 PM, Roy Stogner wrote:
>
> On Mon, 22 Nov 2010, Boyce Griffith wrote:
>
>> FWIW --- the g++ compiler option -Weffc++ can be helpful for tracking
>> down this kind of stuff --- it will emit warnings about classes that
>> violate some of the coding guidelines from Myers' book Effective C++,
>> including one regarding copy constructors and assignment operators.
>
> There's been some discussion here about turning that option on by
> default in dbg/devel modes and getting libMesh compiling cleanly
> against it. There's just two problems:
>
> The people with the know-how to fix the resulting warnings don't also
> have enough hours in the day as it is.
>
> Various third-party headers we include (mpich2, openmpi, I'm looking
> at you...) don't all compile cleanly against even the basic gcc
> warnings; I'd be surprised if they didn't become much much worse with
> Effective C++ warnings turned on.

I don't use -Weffc++ much for this very reason.  An easy approach to 
dealing with all of the noise is to pipe the output of make through grep 
-v.  My recollection is that it isn't that bad to set this up to 
separate the wheat from the chaff.

-Weffc++ also assumes that you are coding in the fairly specific manner 
advocated by Myers, which does not apply to all projects.  (For the 
record, I do like his C++ coding rules, even if I don't always follow them.)

-- Boyce

------------------------------------------------------------------------------
Increase Visibility of Your 3D Game App & Earn a Chance To Win $500!
Tap into the largest installed PC base & get more eyes on your game by
optimizing for Intel(R) Graphics Technology. Get started today with the
Intel(R) Software Partner Program. Five $500 cash prizes are up for grabs.
http://p.sf.net/sfu/intelisp-dev2dev
_______________________________________________
Libmesh-devel mailing list
[email protected]
https://lists.sourceforge.net/lists/listinfo/libmesh-devel

Reply via email to