summaryrefslogtreecommitdiff
path: root/lib
diff options
context:
space:
mode:
authorPaul Eggert <eggert@cs.ucla.edu>2005-09-06 08:20:56 +0000
committerPaul Eggert <eggert@cs.ucla.edu>2005-09-06 08:20:56 +0000
commitfd03e5ddc558f1a041e5ce59fbbadfb3424ec9fe (patch)
treecd9296b25270211863df6effbc2d5f2d3ab79ff7 /lib
parent9288303f014da0dc8f4acb8599f9101760565e42 (diff)
downloadcoreutils-fd03e5ddc558f1a041e5ce59fbbadfb3424ec9fe.tar.xz
(__builtin_constant_p): Remove, undoing previous change.
(verify_type__): Solve the problem by using a bit-field rather than an array.
Diffstat (limited to 'lib')
-rw-r--r--lib/verify.h12
1 files changed, 1 insertions, 11 deletions
diff --git a/lib/verify.h b/lib/verify.h
index 099d27061..c755762aa 100644
--- a/lib/verify.h
+++ b/lib/verify.h
@@ -24,23 +24,13 @@
# define GL_CONCAT0(x, y) x##y
# define GL_CONCAT(x, y) GL_CONCAT0 (x, y)
-/* If gcc predates 3.0, then disable the check below to ensure
- that verify_type__'s argument is a constant expression. */
-# if __GNUC__ <= 2
-# defined __builtin_constant_p(R) 1
-# endif
-
/* A type that is valid if and only if R is nonzero.
R should be an integer constant expression.
verify_type__ and verify_error_if_negative_size__ are symbols that
are private to this header file. */
# define verify_type__(R) \
- struct { \
- /* Provoke a compile-time failure if R is a non-constant expression. */ \
- int verify_error_if_non_const__[__builtin_constant_p (R) ? 1 : -1]; \
- /* Provoke a compile-time failure if R is nonzero. */ \
- int verify_error_if_negative_size__[(R) ? 1 : -1]; }
+ struct { int verify_error_if_negative_size__ : (R) ? 1 : -1; }
/* Verify requirement R at compile-time, as a declaration.
R should be an integer constant expression.