On Thu, 31 Jan 2013, Kirk, Benjamin (JSC-EG311) wrote:
On Jan 31, 2013, at 9:41 AM, John Peterson <peter...@cfdlab.ae.utexas.edu>
wrote:
BTW, I'm not sure we should ever add -Wshadow to default compiler
flags for libmesh! Any apps compiling using libmesh_CXXFLAGS would
suddenly explode with new (usually innocuous) warnings
-Wconversion is nearly as overzealous. For every real "this would
break somewhere in the 200-2000 million DoF range" bug I'm fixing,
there's about ten "tell the compiler that it's okay to downcast that
std::vector::size() to a 32 bit int" false positive warning fixes
along with it.
If we don't we will continue to write shadowed code ourselves…
So I propose we add them to the git repo, potentially removing them for a
particular release?
We could just add the flags to our buildbot tests, or we could add a
"paranoid" METHOD, or we could add a --enable-paranoid-warnings
configure option, in roughly increasing order of desirability IMHO.
what really makes me nuts is when things get triggered in headers we include…
Newer gcc versions are slowly getting better about allowing
selectively disabled warnings. I don't recall whether -Wshadow and
-Wconversion are among the disableable offenders, though, and IIRC
it's often not even enough to disable-wrap the headers in C++ code,
you have to wrap the code that triggers instantiation of the templates
in the headers.
---
Roy
------------------------------------------------------------------------------
Everyone hates slow websites. So do we.
Make your web apps faster with AppDynamics
Download AppDynamics Lite for free today:
http://p.sf.net/sfu/appdyn_d2d_jan
_______________________________________________
Libmesh-devel mailing list
Libmesh-devel@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/libmesh-devel