|
[Rivet-svn] rivet: 2 new changesetsRivet Mercurial rivet at projects.hepforge.orgThu Nov 5 11:45:02 GMT 2015
details: https://rivet.hepforge.org/hg/rivet/rev/e9a6baceb7a5 branches: release-2-4-x changeset: 4912:e9a6baceb7a5 user: Andy Buckley <andy at insectnation.org> date: Thu Nov 05 11:30:06 2015 +0000 description: Use standard MAX_DBL and MAX_INT macros as a source for MAXDOUBLE and MAXINT, to suppress GCC5 warnings. Convert namespace-global const variables to be static, to suppress compiler warnings. Remove the -Wno-unused-variable flag thanks to the above fixes, and because we want to see real warnings. details: https://rivet.hepforge.org/hg/rivet/rev/77f562a93788 branches: release-2-4-x changeset: 4913:77f562a93788 user: Andy Buckley <andy at insectnation.org> date: Thu Nov 05 11:31:36 2015 +0000 description: Use standard MAX_DBL and MAX_INT macros as a source for MAXDOUBLE and MAXINT, to suppress GCC5 warnings. Convert namespace-global const variables to be static, to suppress compiler warnings. Remove the -Wno-unused-variable flag thanks to the above fixes, and because we want to see real warnings. diffs (truncated from 63 to 50 lines): --- a/ChangeLog Wed Nov 04 18:26:33 2015 +0000 +++ b/ChangeLog Thu Nov 05 11:31:36 2015 +0000 @@ -1,7 +1,13 @@ +2015-11-05 Andy Buckley <andy.buckley at cern.ch> + + * Convert namespace-global const variables to be static, to suppress compiler warnings. + + * Use standard MAX_DBL and MAX_INT macros as a source for MAXDOUBLE and MAXINT, to suppress GCC5 warnings. + 2015-11-04 Holger Schulz <holger.schulz at durham.ac.uk> * Adding LHCB inelastic xsection measurement (LHCB_2015_I1333223) - + * Adding ATLAS colour flow in ttbar->semileptonic measurement (ATLAS_2015_I1376945) 2015-10-07 Chris Pollard <cpollard at cern.ch> --- a/configure.ac Wed Nov 04 18:26:33 2015 +0000 +++ b/configure.ac Thu Nov 05 11:31:36 2015 +0000 @@ -326,7 +326,7 @@ AC_CEDAR_CHECKCXXFLAG([-Wall], [AM_CXXFLAGS="$AM_CXXFLAGS -Wall"]) AC_CEDAR_CHECKCXXFLAG([-Wno-long-long], [AM_CXXFLAGS="$AM_CXXFLAGS -Wno-long-long"]) AC_CEDAR_CHECKCXXFLAG([-Wno-format], [AM_CXXFLAGS="$AM_CXXFLAGS -Wno-format"]) -AC_CEDAR_CHECKCXXFLAG([-Wno-unused-variable], [AM_CXXFLAGS="$AM_CXXFLAGS -Wno-unused-variable"]) +dnl AC_CEDAR_CHECKCXXFLAG([-Wno-unused-variable], [AM_CXXFLAGS="$AM_CXXFLAGS -Wno-unused-variable"]) AC_CEDAR_CHECKCXXFLAG([-Werror=uninitialized], [AM_CXXFLAGS="$AM_CXXFLAGS -Werror=uninitialized"]) AC_CEDAR_CHECKCXXFLAG([-Werror=delete-non-virtual-dtor], [AM_CXXFLAGS="$AM_CXXFLAGS -Werror=delete-non-virtual-dtor"]) --- a/include/Rivet/Math/MathHeader.hh Wed Nov 04 18:26:33 2015 +0000 +++ b/include/Rivet/Math/MathHeader.hh Thu Nov 05 11:31:36 2015 +0000 @@ -8,6 +8,7 @@ #include <sstream> #include <iostream> #include <limits> +#include <cfloat> #include <cmath> #include <map> #include <vector> @@ -61,17 +62,19 @@ using std::isnan; using std::isinf; - const double MAXDOUBLE = std::numeric_limits<double>::max(); - const double MAXINT = std::numeric_limits<int>::max(); + /// Pre-defined numeric type limits + /// @deprecated Prefer the standard DBL/INT_MAX + static const double MAXDOUBLE = DBL_MAX; // was std::numeric_limits<double>::max(); -- warns in GCC5 + static const double MAXINT = INT_MAX; // was std::numeric_limits<int>::max(); -- warns in GCC5 /// A pre-defined value of \f$ \pi \f$.
More information about the Rivet-svn mailing list |