I am in favor of gradually dropping usage of GNU extension.   C++11 standard provides a clean solution for constant value definition.  Though not many compilers are C++11 compliant at this moment,  it is definitely the future direction of VXL. 

Regards,
Gehua Yang



On Fri, Mar 1, 2013 at 2:40 PM, Bill Hoffman <bill.hoffman@kitware.com> wrote:
The default build of vxl with clang produces tons of warnings like this:

/.../vxl/core/vnl/vnl_math.h:96:36: warning: in-class initializer for
static data member of type 'const double' is a GNU extension [-Wgnu]

   static VNL_DLL_DATA const double one_over_sqrt2pi
VCL_STATIC_CONST_INIT_FLOAT_DECL(0.39894228040143267794);


The clang vxl dashboard gets around this issue with this:
http://open.cdash.org/viewNotes.php?buildid=2820316
-Werror=gnu

This means that any gnu extensions are errors and when cmake does the
try compile for this it will fail.   I am thinking the try compile needs
to be fixed or maybe this usage should just be removed since it is a gnu
only extension...

Thoughts?

-Bill

------------------------------------------------------------------------------
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_feb
_______________________________________________
Vxl-maintainers mailing list
Vxl-maintainers@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/vxl-maintainers