From 8418aa059ac8d7b4cd90512b2d1d1fe228ebdfd2 Mon Sep 17 00:00:00 2001 From: Andrew Johnson Date: Thu, 7 Apr 2011 17:25:02 -0500 Subject: [PATCH] libCom/test: Suppress g++ build warnings from epicsCalcTest Newer versions of gcc support #pragma GCC diagnostic --- src/libCom/test/epicsCalcTest.cpp | 8 ++++++++ 1 file changed, 8 insertions(+) diff --git a/src/libCom/test/epicsCalcTest.cpp b/src/libCom/test/epicsCalcTest.cpp index 5436330f4..df30e68a5 100644 --- a/src/libCom/test/epicsCalcTest.cpp +++ b/src/libCom/test/epicsCalcTest.cpp @@ -224,6 +224,14 @@ static inline double MIN(double a, double b, double c, double d, double e, return MIN(MIN(a,b,c,d,e,f,g,h,i,j,k),l); } +/* The test code below generates lots of spurious warnings because + * it's making sure that our operator priorities match those of C. + * Disable them to quieten the compilation process where possible. + */ +#if __GNUC__ > 4 || (__GNUC__ == 4 && __GNUC_MINOR__ >= 2) +# pragma GCC diagnostic ignored "-Wparentheses" +#endif + MAIN(epicsCalcTest) { int repeat;