summaryrefslogtreecommitdiff
path: root/lib/verify.h
diff options
context:
space:
mode:
authorPaul Eggert <eggert@cs.ucla.edu>2017-01-30 18:20:43 -0800
committerPaul Eggert <eggert@cs.ucla.edu>2017-01-30 18:21:35 -0800
commit16f6a8d8d81cc93745a24c0fb89caab2c383ae3c (patch)
tree804ecd91bdd5ef335a670712440f2750745bf703 /lib/verify.h
parent4e6e16b3f43ce96302b1e52e48730c1f15e18c14 (diff)
downloadgnulib-16f6a8d8d81cc93745a24c0fb89caab2c383ae3c.tar.gz
Port to PGI 16.10 x86-64
This patch fixes one real bug in gl_anylinked_list2.h, along with some minor glitches that are not bugs. It does not silence PGI’s thousands of bogus warnings when compiling test-intprops.c. Fortunately, the warnings do not cause a failure. * lib/c-ctype.h (_C_CTYPE_LOWER_A_THRU_F_N, _C_CTYPE_LOWER_N): Rename parameter to avoid PGI warning about ‘#define f(n) 'n'’. My goodness, PGI goes back a long ways - this predates C89! * lib/gl_anylinked_list2.h (ASYNCSAFE): Fix bug caught by PGI. For example, ASYNCSAFE (const void *) should expand to ‘const void *volatile’, not to ‘volatile const void *’. * lib/spawn.in.h (POSIX_SPAWN_USEVFORK): Don't define if already defined. * lib/verify.h (verify) [!__GNUC__]: Use shorter albeit meaningless string to bypass silly compiler limits. * tests/infinity.h (Infinityf, Infinityd, Infinityl) [__PGI]: * tests/nan.h (NaNf, NaNd, NaNl): Use static functions to avoid misguided compiler diagnostics. Is there some reason we don’t use static functions on all platforms?
Diffstat (limited to 'lib/verify.h')
-rw-r--r--lib/verify.h7
1 files changed, 6 insertions, 1 deletions
diff --git a/lib/verify.h b/lib/verify.h
index dcaf7cab93..dcba9c8cb0 100644
--- a/lib/verify.h
+++ b/lib/verify.h
@@ -248,7 +248,12 @@ template <int w>
/* Verify requirement R at compile-time, as a declaration without a
trailing ';'. */
-#define verify(R) _GL_VERIFY (R, "verify (" #R ")")
+#ifdef __GNUC__
+# define verify(R) _GL_VERIFY (R, "verify (" #R ")")
+#else
+/* PGI barfs if R is long. Play it safe. */
+# define verify(R) _GL_VERIFY (R, "verify (...)")
+#endif
#ifndef __has_builtin
# define __has_builtin(x) 0