tests: Avoid missing missing-prototype warning with <fenv.h> on glibc 2.17.
authorLudovic Courtès <ludo@gnu.org>
Wed, 27 Feb 2013 18:59:09 +0000 (19:59 +0100)
committerLudovic Courtès <ludo@gnu.org>
Wed, 27 Feb 2013 19:40:07 +0000 (20:40 +0100)
* test-suite/standalone/test-round.c: Avoid missing-prototype warning
  with <fenv.h> on glibc 2.17.

test-suite/standalone/test-round.c

index f1458af..150c881 100644 (file)
 #include <stdio.h>
 
 #if HAVE_FENV_H
-#include <fenv.h>
+# if defined __GNUC__ && defined __GLIBC__
+/* In Glibc 2.17, <bits/fenv.h> defines `feraiseexcept' as an inline
+   without declaring it first, so ignore the warning.  */
+#   pragma GCC diagnostic push
+#   pragma GCC diagnostic ignored "-Wmissing-prototypes"
+# endif
+# include <fenv.h>
+# if defined __GNUC__ && defined __GLIBC__
+#   pragma GCC diagnostic pop
+# endif
 #elif defined HAVE_MACHINE_FPU_H
 /* On Tru64 5.1b, the declaration of fesetround(3) is in <machine/fpu.h>.
    On NetBSD, this header has to be included along with <sys/types.h>.  */