]> Savannah Git Hosting - gnulib.git/commitdiff
assert-h: prefer to ‘verify’
authorPaul Eggert <eggert@cs.ucla.edu>
Tue, 13 Sep 2022 22:29:36 +0000 (17:29 -0500)
committerPaul Eggert <eggert@cs.ucla.edu>
Tue, 13 Sep 2022 22:52:21 +0000 (17:52 -0500)
Where it’s easy, prefer ‘static_assert’ to ‘verify’,
as this simplifies the source by removing the need to
include verify.h.  Keep using ‘verify’ if verify.h
is used for other reasons, or if code is shared with glibc.
* lib/alignalloc.c, lib/argmatch.h, lib/c32is-impl.h:
* lib/c32snrtombs.c, lib/c32srtombs.c, lib/exclude.c:
* lib/filevercmp.c, lib/fma.c, lib/i-ring.h, lib/ino-map.c:
* lib/localeinfo.c, lib/malloca.c, lib/mbrtoc32.c, lib/mbrtowc.c:
* lib/mbsinit.c, lib/mbsnrtoc32s.c, lib/mbsrtoc32s.c:
* lib/nanosleep.c, lib/parse-datetime.y, lib/pipe2.c:
* lib/rawmemchr.c, lib/relocwrapper.c, lib/sleep.c:
* lib/stat-w32.c, lib/strerror.c, lib/strtoimax.c:
* lib/utimecmp.c, lib/vasnprintf.c, tests/test-alignof.c:
* tests/test-intprops.c, tests/test-libgmp.c:
* tests/test-limits-h.c, tests/test-locale.c:
* tests/test-pthread.c, tests/test-round2.c:
* tests/test-stdalign.c, tests/test-stddef.c, tests/test-stdio.c:
* tests/test-stdlib.c, tests/test-string.c, tests/test-sys_stat.c:
* tests/test-time.c, tests/test-uchar.c, tests/test-unistd.c:
* tests/test-wchar.c:
Prefer static_assert to verify, and stop including verify.h.
* lib/stat.c: Don’t include verify.h (this include was unnecessary).
* modules/alignalloc, modules/alignof-tests, modules/argmatch:
* modules/c-vasnprintf, modules/c32isalnum, modules/c32isalpha:
* modules/c32isblank, modules/c32iscntrl, modules/c32isdigit:
* modules/c32isgraph, modules/c32islower, modules/c32isprint:
* modules/c32ispunct, modules/c32isspace, modules/c32isupper:
* modules/c32isxdigit, modules/c32snrtombs, modules/c32srtombs:
* modules/exclude, modules/filevercmp, modules/fma, modules/fmaf:
* modules/fmal, modules/fstat, modules/i-ring, modules/ino-map:
* modules/intprops-tests, modules/libgmp-tests:
* modules/limits-h-tests, modules/locale-tests, modules/malloca:
* modules/mbrtoc32, modules/mbrtowc, modules/mbsinit:
* modules/mbsnrtoc32s, modules/mbsrtoc32s, modules/nanosleep:
* modules/parse-datetime, modules/pipe2, modules/pthread-h-tests:
* modules/rawmemchr, modules/relocatable-prog-wrapper:
* modules/round-tests, modules/roundf-tests, modules/sleep:
* modules/stat, modules/stdalign-tests, modules/stdckdint-tests:
* modules/stddef-tests, modules/stdio-tests, modules/stdlib-tests:
* modules/strerror, modules/string-tests, modules/strtoimax:
* modules/strtoumax, modules/sys_stat-tests, modules/time-tests:
* modules/uchar-tests, modules/unistd-tests:
* modules/unistdio/u16-u16-vasnprintf:
* modules/unistdio/u16-vasnprintf:
* modules/unistdio/u32-u32-vasnprintf:
* modules/unistdio/u32-vasnprintf:
* modules/unistdio/u8-u8-vasnprintf:
* modules/unistdio/u8-vasnprintf, modules/unistdio/ulc-vasnprintf:
* modules/utimecmp, modules/vasnprintf, modules/wchar-tests:
Depend on assert-h, not verify.

116 files changed:
ChangeLog
lib/alignalloc.c
lib/argmatch.h
lib/c32is-impl.h
lib/c32snrtombs.c
lib/c32srtombs.c
lib/exclude.c
lib/filevercmp.c
lib/fma.c
lib/i-ring.h
lib/ino-map.c
lib/localeinfo.c
lib/malloca.c
lib/mbrtoc32.c
lib/mbrtowc.c
lib/mbsinit.c
lib/mbsnrtoc32s.c
lib/mbsrtoc32s.c
lib/nanosleep.c
lib/parse-datetime.y
lib/pipe2.c
lib/rawmemchr.c
lib/relocwrapper.c
lib/sleep.c
lib/stat-w32.c
lib/stat.c
lib/strerror.c
lib/strtoimax.c
lib/utimecmp.c
lib/vasnprintf.c
modules/alignalloc
modules/alignof-tests
modules/argmatch
modules/c-vasnprintf
modules/c32isalnum
modules/c32isalpha
modules/c32isblank
modules/c32iscntrl
modules/c32isdigit
modules/c32isgraph
modules/c32islower
modules/c32isprint
modules/c32ispunct
modules/c32isspace
modules/c32isupper
modules/c32isxdigit
modules/c32snrtombs
modules/c32srtombs
modules/exclude
modules/filevercmp
modules/fma
modules/fmaf
modules/fmal
modules/fstat
modules/i-ring
modules/ino-map
modules/intprops-tests
modules/libgmp-tests
modules/limits-h-tests
modules/locale-tests
modules/malloca
modules/mbrtoc32
modules/mbrtowc
modules/mbsinit
modules/mbsnrtoc32s
modules/mbsrtoc32s
modules/nanosleep
modules/parse-datetime
modules/pipe2
modules/pthread-h-tests
modules/rawmemchr
modules/relocatable-prog-wrapper
modules/round-tests
modules/roundf-tests
modules/sleep
modules/stat
modules/stdalign-tests
modules/stdckdint-tests
modules/stddef-tests
modules/stdio-tests
modules/stdlib-tests
modules/strerror
modules/string-tests
modules/strtoimax
modules/strtoumax
modules/sys_stat-tests
modules/time-tests
modules/uchar-tests
modules/unistd-tests
modules/unistdio/u16-u16-vasnprintf
modules/unistdio/u16-vasnprintf
modules/unistdio/u32-u32-vasnprintf
modules/unistdio/u32-vasnprintf
modules/unistdio/u8-u8-vasnprintf
modules/unistdio/u8-vasnprintf
modules/unistdio/ulc-vasnprintf
modules/utimecmp
modules/vasnprintf
modules/wchar-tests
tests/test-alignof.c
tests/test-intprops.c
tests/test-libgmp.c
tests/test-limits-h.c
tests/test-locale.c
tests/test-pthread.c
tests/test-round2.c
tests/test-stdalign.c
tests/test-stddef.c
tests/test-stdio.c
tests/test-stdlib.c
tests/test-string.c
tests/test-sys_stat.c
tests/test-time.c
tests/test-uchar.c
tests/test-unistd.c
tests/test-wchar.c

index bba1a1a4e4658b8c15fb4f9c4b5e20d4e67eaf1e..7c1b0afaddddaf0d9791c44bc855c57851064d75 100644 (file)
--- a/ChangeLog
+++ b/ChangeLog
@@ -7,6 +7,58 @@
 
 2022-09-13  Paul Eggert  <eggert@cs.ucla.edu>
 
+       assert-h: prefer to ‘verify’
+       Where it’s easy, prefer ‘static_assert’ to ‘verify’,
+       as this simplifies the source by removing the need to
+       include verify.h.  Keep using ‘verify’ if verify.h
+       is used for other reasons, or if code is shared with glibc.
+       * lib/alignalloc.c, lib/argmatch.h, lib/c32is-impl.h:
+       * lib/c32snrtombs.c, lib/c32srtombs.c, lib/exclude.c:
+       * lib/filevercmp.c, lib/fma.c, lib/i-ring.h, lib/ino-map.c:
+       * lib/localeinfo.c, lib/malloca.c, lib/mbrtoc32.c, lib/mbrtowc.c:
+       * lib/mbsinit.c, lib/mbsnrtoc32s.c, lib/mbsrtoc32s.c:
+       * lib/nanosleep.c, lib/parse-datetime.y, lib/pipe2.c:
+       * lib/rawmemchr.c, lib/relocwrapper.c, lib/sleep.c:
+       * lib/stat-w32.c, lib/strerror.c, lib/strtoimax.c:
+       * lib/utimecmp.c, lib/vasnprintf.c, tests/test-alignof.c:
+       * tests/test-intprops.c, tests/test-libgmp.c:
+       * tests/test-limits-h.c, tests/test-locale.c:
+       * tests/test-pthread.c, tests/test-round2.c:
+       * tests/test-stdalign.c, tests/test-stddef.c, tests/test-stdio.c:
+       * tests/test-stdlib.c, tests/test-string.c, tests/test-sys_stat.c:
+       * tests/test-time.c, tests/test-uchar.c, tests/test-unistd.c:
+       * tests/test-wchar.c:
+       Prefer static_assert to verify, and stop including verify.h.
+       * lib/stat.c: Don’t include verify.h (this include was unnecessary).
+       * modules/alignalloc, modules/alignof-tests, modules/argmatch:
+       * modules/c-vasnprintf, modules/c32isalnum, modules/c32isalpha:
+       * modules/c32isblank, modules/c32iscntrl, modules/c32isdigit:
+       * modules/c32isgraph, modules/c32islower, modules/c32isprint:
+       * modules/c32ispunct, modules/c32isspace, modules/c32isupper:
+       * modules/c32isxdigit, modules/c32snrtombs, modules/c32srtombs:
+       * modules/exclude, modules/filevercmp, modules/fma, modules/fmaf:
+       * modules/fmal, modules/fstat, modules/i-ring, modules/ino-map:
+       * modules/intprops-tests, modules/libgmp-tests:
+       * modules/limits-h-tests, modules/locale-tests, modules/malloca:
+       * modules/mbrtoc32, modules/mbrtowc, modules/mbsinit:
+       * modules/mbsnrtoc32s, modules/mbsrtoc32s, modules/nanosleep:
+       * modules/parse-datetime, modules/pipe2, modules/pthread-h-tests:
+       * modules/rawmemchr, modules/relocatable-prog-wrapper:
+       * modules/round-tests, modules/roundf-tests, modules/sleep:
+       * modules/stat, modules/stdalign-tests, modules/stdckdint-tests:
+       * modules/stddef-tests, modules/stdio-tests, modules/stdlib-tests:
+       * modules/strerror, modules/string-tests, modules/strtoimax:
+       * modules/strtoumax, modules/sys_stat-tests, modules/time-tests:
+       * modules/uchar-tests, modules/unistd-tests:
+       * modules/unistdio/u16-u16-vasnprintf:
+       * modules/unistdio/u16-vasnprintf:
+       * modules/unistdio/u32-u32-vasnprintf:
+       * modules/unistdio/u32-vasnprintf:
+       * modules/unistdio/u8-u8-vasnprintf:
+       * modules/unistdio/u8-vasnprintf, modules/unistdio/ulc-vasnprintf:
+       * modules/utimecmp, modules/vasnprintf, modules/wchar-tests:
+       Depend on assert-h, not verify.
+
        assert-h: static_assert is a keyword in C23
        * m4/assert_h.m4 (gl_ASSERT_H): Also test for static_assert
        keyword a la C23, and define HAVE_C_STATIC_ASSERT if so.
index 1884394e3cce87ef6b2251ac13726a60e43344e7..1be5d4d2ba3bb532ba18cbc6170668a32228cd2c 100644 (file)
@@ -26,7 +26,6 @@
 #include <stdalign.h>
 #include <stdckdint.h>
 #include <stdint.h>
-#include "verify.h"
 
 #if !ALIGNALLOC_VIA_ALIGNED_ALLOC
 # if HAVE_POSIX_MEMALIGN
@@ -37,7 +36,7 @@
    sizeof (void *) is a power of two, which is true on all known platforms.
    This check is here rather than in alignalloc.h to save the compiler
    the trouble of checking it each time alignalloc.h is included.  */
-verify (! (sizeof (void *) & (sizeof (void *) - 1)));
+static_assert (! (sizeof (void *) & (sizeof (void *) - 1)));
 
 # else /* !HAVE_POSIX_MEMALIGN */
 
@@ -62,7 +61,7 @@ address_of_pointer_to_malloced (unsigned char *r)
      for a 0 byte at R - 1.  This approach assumes UCHAR_MAX is large
      enough so that there is room for P; although true on all
      plausible platforms, check the assumption to be safe.  */
-  verify (sizeof (void *) + alignof (void *) - 1 <= UCHAR_MAX);
+  static_assert (sizeof (void *) + alignof (void *) - 1 <= UCHAR_MAX);
 
   return align_down (r - 1 - sizeof (void *), alignof (void *));
 }
index 846cff90661f9504f620f106b597186b4ff33c59..db98187d7fdb2f2316ee4f50fdcff27d41934ba9 100644 (file)
@@ -29,7 +29,6 @@
 
 # include "gettext.h"
 # include "quote.h"
-# include "verify.h"
 
 # ifdef  __cplusplus
 extern "C" {
@@ -41,7 +40,8 @@ extern "C" {
    (argument list ends with a NULL guard).  */
 
 # define ARGMATCH_VERIFY(Arglist, Vallist) \
-    verify (ARRAY_CARDINALITY (Arglist) == ARRAY_CARDINALITY (Vallist) + 1)
+    static_assert (ARRAY_CARDINALITY (Arglist) \
+                   == ARRAY_CARDINALITY (Vallist) + 1)
 
 /* Return the index of the element of ARGLIST (NULL terminated) that
    matches with ARG.  If VALLIST is not NULL, then use it to resolve
index 6b910fafbf8cb55caf7c6120218514aa2827a402..ed3758c9e0d310e090b2fffc64c604b7a55a537b 100644 (file)
@@ -37,7 +37,6 @@
 #endif
 
 #include "unictype.h"
-#include "verify.h"
 
 int
 FUNC (wint_t wc)
@@ -96,7 +95,7 @@ FUNC (wint_t wc)
 
 #else /* macOS, FreeBSD, NetBSD, OpenBSD, HP-UX, Solaris, Minix, Android */
   /* char32_t and wchar_t are equivalent.  */
-  verify (sizeof (char32_t) == sizeof (wchar_t));
+  static_assert (sizeof (char32_t) == sizeof (wchar_t));
 
   return WCHAR_FUNC (wc);
 #endif
index 6bbc65dad0008509871806308d58bc2c3c8e6133..4b3b40a8f67ed3958b78f38355c132fb40036176 100644 (file)
@@ -42,9 +42,7 @@ extern mbstate_t _gl_c32srtombs_state;
 #else
 /* char32_t and wchar_t are equivalent.  */
 
-# include "verify.h"
-
-verify (sizeof (char32_t) == sizeof (wchar_t));
+static_assert (sizeof (char32_t) == sizeof (wchar_t));
 
 size_t
 c32snrtombs (char *dest, const char32_t **srcp, size_t srclen, size_t len,
index d7480659a1ba1c7ceb6334fbe5873c50320e1e08..6f08deb234b48ad7ab60055da20fe7737c0dc2bf 100644 (file)
@@ -42,9 +42,7 @@ extern mbstate_t _gl_c32srtombs_state;
 #else
 /* char32_t and wchar_t are equivalent.  */
 
-# include "verify.h"
-
-verify (sizeof (char32_t) == sizeof (wchar_t));
+static_assert (sizeof (char32_t) == sizeof (wchar_t));
 
 size_t
 c32srtombs (char *dest, const char32_t **srcp, size_t len, mbstate_t *ps)
index a39df312f2742c92b58ad195bc67389926c50ff7..4b96dbfc3fd90627e026a2b5f00290c3f2c19deb 100644 (file)
@@ -37,7 +37,6 @@
 #include "mbuiter.h"
 #include "fnmatch.h"
 #include "xalloc.h"
-#include "verify.h"
 #include "filename.h"
 
 #if GNULIB_EXCLUDE_SINGLE_THREAD
 # define FNM_LEADING_DIR 0
 #endif
 
-verify (((EXCLUDE_ANCHORED | EXCLUDE_INCLUDE | EXCLUDE_WILDCARDS)
-         & (FNM_PATHNAME | FNM_NOESCAPE | FNM_PERIOD | FNM_LEADING_DIR
-            | FNM_CASEFOLD | FNM_EXTMATCH))
-        == 0);
+static_assert (((EXCLUDE_ANCHORED | EXCLUDE_INCLUDE | EXCLUDE_WILDCARDS)
+                & (FNM_PATHNAME | FNM_NOESCAPE | FNM_PERIOD | FNM_LEADING_DIR
+                   | FNM_CASEFOLD | FNM_EXTMATCH))
+               == 0);
 
 
 /* Exclusion patterns are grouped into a singly-linked list of
index cb1b38d473df10a338ff6dffe650e79368e43fb9..844505a6bf7bb5b3ec2d09c1f3e6330a4f40cf33 100644 (file)
@@ -23,7 +23,6 @@
 #include <c-ctype.h>
 #include <limits.h>
 #include <idx.h>
-#include <verify.h>
 
 /* Return the length of a prefix of S that corresponds to the suffix
    defined by this extended regular expression in the C locale:
@@ -74,7 +73,7 @@ order (char const *s, idx_t pos, idx_t len)
     return -2;
   else
     {
-      verify (UCHAR_MAX <= (INT_MAX - 1 - 2) / 2);
+      static_assert (UCHAR_MAX <= (INT_MAX - 1 - 2) / 2);
       return c + UCHAR_MAX + 1;
     }
 }
index 25a41c485f4c0cb3a6ce6bcd498050c850f4b520..55f4fcdc980988d6c0b15584babefe583778dd29 100644 (file)
--- a/lib/fma.c
+++ b/lib/fma.c
@@ -32,7 +32,6 @@
 
 #include "float+.h"
 #include "integer_length.h"
-#include "verify.h"
 
 #ifdef USE_LONG_DOUBLE
 # define FUNC fmal
 
 typedef unsigned int mp_limb_t;
 #define GMP_LIMB_BITS 32
-verify (sizeof (mp_limb_t) * CHAR_BIT == GMP_LIMB_BITS);
+static_assert (sizeof (mp_limb_t) * CHAR_BIT == GMP_LIMB_BITS);
 
 typedef unsigned long long mp_twolimb_t;
 #define GMP_TWOLIMB_BITS 64
-verify (sizeof (mp_twolimb_t) * CHAR_BIT == GMP_TWOLIMB_BITS);
+static_assert (sizeof (mp_twolimb_t) * CHAR_BIT == GMP_TWOLIMB_BITS);
 
 /* Number of limbs needed for a single DOUBLE.  */
 #define NLIMBS1 ((MANT_BIT + GMP_LIMB_BITS - 1) / GMP_LIMB_BITS)
index ec27d5a3f4129bd6dd2fb11456a2abde14e145e2..d4efb9726d6e010d7cce541624d4ed1d929ca082 100644 (file)
    You should have received a copy of the GNU Lesser General Public License
    along with this program.  If not, see <https://www.gnu.org/licenses/>.  */
 
-#include "verify.h"
 
 enum { I_RING_SIZE = 4 };
-verify (1 <= I_RING_SIZE);
+static_assert (1 <= I_RING_SIZE);
 
 /* When ir_empty is true, the ring is empty.
    Otherwise, ir_data[B..F] are defined, where B..F is the contiguous
index d9c56a0fa4aba91317a4b1a43b25fbc41fa43376..9a97391b8a0a2364132a6a74ce810ec14529d121 100644 (file)
@@ -21,7 +21,6 @@
 #include "ino-map.h"
 
 #include "hash.h"
-#include "verify.h"
 
 #include <limits.h>
 #include <stdlib.h>
@@ -151,7 +150,7 @@ ino_map_insert (struct ino_map *im, ino_t ino)
          overflow to zero, then it must equal INO_MAP_INSERT_FAILURE,
          which is the value that should be returned in that case.
          Verify that this works.  */
-      verify (INO_MAP_INSERT_FAILURE + 1 == 0);
+      static_assert (INO_MAP_INSERT_FAILURE + 1 == 0);
 
       /* Prepare to allocate a new probe next time; this one is in use.  */
       im->probe = NULL;
index 0e74f4220f97150902721a1b51e06c1965c1facf..34c020cdc6d8ffbd750ae3b887007bceacbdfbca 100644 (file)
@@ -23,8 +23,6 @@
 
 #include <localeinfo.h>
 
-#include <verify.h>
-
 #include <limits.h>
 #include <locale.h>
 #include <stdlib.h>
@@ -32,7 +30,7 @@
 #include <wctype.h>
 
 /* The sbclen implementation relies on this.  */
-verify (MB_LEN_MAX <= SCHAR_MAX);
+static_assert (MB_LEN_MAX <= SCHAR_MAX);
 
 /* Return true if the locale uses UTF-8.  */
 
@@ -123,8 +121,8 @@ static short const lonesome_lower[] =
 
 /* Verify that the worst case fits.  This is 1 for towupper, 1 for
    towlower, and 1 for each entry in LONESOME_LOWER.  */
-verify (1 + 1 + sizeof lonesome_lower / sizeof *lonesome_lower
-        <= CASE_FOLDED_BUFSIZE);
+static_assert (1 + 1 + sizeof lonesome_lower / sizeof *lonesome_lower
+               <= CASE_FOLDED_BUFSIZE);
 
 /* Find the characters equal to C after case-folding, other than C
    itself, and store them into FOLDED.  Return the number of characters
index 183783a71045e8c2a8e4becb452bd657b4d720ea..1e19978d90b387e57047cf09f8e23f8a3cedf42a 100644 (file)
@@ -24,7 +24,6 @@
 #include <stdckdint.h>
 
 #include "idx.h"
-#include "verify.h"
 
 /* The speed critical point in this file is freea() applied to an alloca()
    result: it must be fast, to match the speed of alloca().  The speed of
@@ -40,7 +39,7 @@
 /* Type for holding very small pointer differences.  */
 typedef unsigned char small_t;
 /* Verify that it is wide enough.  */
-verify (2 * sa_alignment_max - 1 <= (small_t) -1);
+static_assert (2 * sa_alignment_max - 1 <= (small_t) -1);
 
 void *
 mmalloca (size_t n)
index 6d09fe6db4baf826e76e66722f4822b73719360b..8f8095295de26c772816ac0cd93e0a76ce9ecd1b 100644 (file)
 
 # endif
 
-# include "verify.h"
 # include "lc-charset-dispatch.h"
 # include "mbtowc-lock.h"
 
-verify (sizeof (mbstate_t) >= 4);
+static_assert (sizeof (mbstate_t) >= 4);
 static char internal_state[4];
 
 size_t
index 4b164edd4010193cadc6c2bb613d05f49aa4e952..be6fdc6478a043ba23353491eb45b0fdb0456a98 100644 (file)
 # endif
 
 # include "attribute.h"
-# include "verify.h"
 # include "lc-charset-dispatch.h"
 # include "mbtowc-lock.h"
 
-verify (sizeof (mbstate_t) >= 4);
+static_assert (sizeof (mbstate_t) >= 4);
 static char internal_state[4];
 
 size_t
index 9621defc73dc79b3c9f617f17c238563c3cfa9fa..2324f15680fbe17c812c8d194828db1cba81f9c8 100644 (file)
@@ -20,7 +20,6 @@
 /* Specification.  */
 #include <wchar.h>
 
-#include "verify.h"
 
 #if GNULIB_defined_mbstate_t
 
@@ -39,7 +38,7 @@
      - In wc -> mb direction, mbstate_t contains no information. In other
        words, it is always in the initial state.  */
 
-verify (sizeof (mbstate_t) >= 4);
+static_assert (sizeof (mbstate_t) >= 4);
 
 int
 mbsinit (const mbstate_t *ps)
index 8d44d0e13f85d4683f3c35166251de531a4c2bbf..391baee449063d91bb7c3e9f82734ef245b0bd00 100644 (file)
@@ -51,9 +51,7 @@ extern mbstate_t _gl_mbsrtoc32s_state;
 #else
 /* char32_t and wchar_t are equivalent.  */
 
-# include "verify.h"
-
-verify (sizeof (char32_t) == sizeof (wchar_t));
+static_assert (sizeof (char32_t) == sizeof (wchar_t));
 
 size_t
 mbsnrtoc32s (char32_t *dest, const char **srcp, size_t srclen, size_t len,
index 6001b0bbf381d09b3200fd0d180862d0314b71a7..1cd0dd0ad18c9346aeda688e25756bca47991de8 100644 (file)
@@ -43,9 +43,7 @@ extern mbstate_t _gl_mbsrtoc32s_state;
 #else
 /* char32_t and wchar_t are equivalent.  */
 
-# include "verify.h"
-
-verify (sizeof (char32_t) == sizeof (wchar_t));
+static_assert (sizeof (char32_t) == sizeof (wchar_t));
 
 size_t
 mbsrtoc32s (char32_t *dest, const char **srcp, size_t len, mbstate_t *ps)
index 78e612d4b1f5c2a7278fe563b9397455285c32f4..55d6fa650e36b9a79230f7e1d9ecc587f178eda7 100644 (file)
@@ -23,7 +23,6 @@
 #include <time.h>
 
 #include "intprops.h"
-#include "verify.h"
 
 #include <stdio.h>
 #include <sys/types.h>
@@ -58,7 +57,7 @@ nanosleep (const struct timespec *requested_delay,
 
   {
     /* Verify that time_t is large enough.  */
-    verify (TYPE_MAXIMUM (time_t) / 24 / 24 / 60 / 60);
+    static_assert (TYPE_MAXIMUM (time_t) / 24 / 24 / 60 / 60);
     const time_t limit = 24 * 24 * 60 * 60;
     time_t seconds = requested_delay->tv_sec;
     struct timespec intermediate;
index 0903c2003e8c3cceda0b9ae5a14e6af5acd0c5f7..066d414c299ba05b6aed9a8508311cda056522aa 100644 (file)
@@ -38,7 +38,6 @@
 #include "idx.h"
 #include "intprops.h"
 #include "timespec.h"
-#include "verify.h"
 #include "strftime.h"
 
 /* There's no need to extend the stack, so there's no need to involve
@@ -94,9 +93,9 @@
 /* Verify that time_t is an integer as POSIX requires, and that every
    time_t value fits in intmax_t.  Please file a bug report if these
    assumptions are false on your platform.  */
-verify (TYPE_IS_INTEGER (time_t));
-verify (!TYPE_SIGNED (time_t) || INTMAX_MIN <= TYPE_MINIMUM (time_t));
-verify (TYPE_MAXIMUM (time_t) <= INTMAX_MAX);
+static_assert (TYPE_IS_INTEGER (time_t));
+static_assert (!TYPE_SIGNED (time_t) || INTMAX_MIN <= TYPE_MINIMUM (time_t));
+static_assert (TYPE_MAXIMUM (time_t) <= INTMAX_MAX);
 
 /* True if N is out of range for time_t.  */
 static bool
@@ -1253,7 +1252,7 @@ enum { TM_YEAR_BUFSIZE = INT_BUFSIZE_BOUND (int) + 1 };
 static char const *
 tm_year_str (int tm_year, char buf[TM_YEAR_BUFSIZE])
 {
-  verify (TM_YEAR_BASE % 100 == 0);
+  static_assert (TM_YEAR_BASE % 100 == 0);
   sprintf (buf, &"-%02d%02d"[-TM_YEAR_BASE <= tm_year],
            abs (tm_year / 100 + TM_YEAR_BASE / 100),
            abs (tm_year % 100));
index 400aff001a23528f07c53ec8c3b25694cda2bdea..a3cbb7f2611c24c703c3358f3d8a081cd16460f2 100644 (file)
@@ -23,7 +23,6 @@
 #include <fcntl.h>
 
 #include "binary-io.h"
-#include "verify.h"
 
 #if GNULIB_defined_O_NONBLOCK
 # include "nonblocking.h"
@@ -95,7 +94,7 @@ pipe2 (int fd[2], int flags)
     }
 # else
   {
-    verify (O_NONBLOCK == 0);
+    static_assert (O_NONBLOCK == 0);
   }
 # endif
 
index ea68c1bfc6a7b6ec81cf55490e3e016b2a2597bd..c789599db8af56feb0ed4f54880e6c914245617e 100644 (file)
@@ -26,7 +26,6 @@
 # include <stdalign.h>
 # include <stdint.h>
 
-# include "verify.h"
 
 /* Find the first occurrence of C in S.  */
 void *
@@ -36,7 +35,7 @@ rawmemchr (const void *s, int c_in)
   typedef uintptr_t longword;
   /* If you change the "uintptr_t", you should change UINTPTR_WIDTH to match.
      This verifies that the type does not have padding bits.  */
-  verify (UINTPTR_WIDTH == UCHAR_WIDTH * sizeof (longword));
+  static_assert (UINTPTR_WIDTH == UCHAR_WIDTH * sizeof (longword));
 
   const unsigned char *char_ptr;
   unsigned char c = c_in;
index 3ec8b2888b42f744383ce1950c332f46a88a6d52..9ef115300ae6fea58560ab90eb0a16b22bc9b34d 100644 (file)
@@ -81,7 +81,6 @@
 #include "progname.h"
 #include "relocatable.h"
 #include "c-ctype.h"
-#include "verify.h"
 
 /* Use the system functions, not the gnulib overrides in this file.  */
 #undef fprintf
@@ -142,7 +141,7 @@ add_dotbin (const char *filename)
 /* List of directories that contain the libraries.  */
 static const char *libdirs[] = { LIBDIRS NULL };
 /* Verify that at least one directory is given.  */
-verify (sizeof (libdirs) / sizeof (libdirs[0]) > 1);
+static_assert (sizeof (libdirs) / sizeof (libdirs[0]) > 1);
 
 /* Relocate the list of directories that contain the libraries.  */
 static void
index 7a6fb152a7700804bca629078179958de7cc7bfa..80431c108188c57cd5c374997c64db378211ccd4 100644 (file)
@@ -22,8 +22,6 @@
 
 #include <limits.h>
 
-#include "verify.h"
-
 #if defined _WIN32 && ! defined __CYGWIN__
 
 # define WIN32_LEAN_AND_MEAN  /* avoid including junk */
@@ -56,7 +54,7 @@ unsigned int
 rpl_sleep (unsigned int seconds)
 {
   /* This requires int larger than 16 bits.  */
-  verify (UINT_MAX / 24 / 24 / 60 / 60);
+  static_assert (UINT_MAX / 24 / 24 / 60 / 60);
   const unsigned int limit = 24 * 24 * 60 * 60;
   while (limit < seconds)
     {
index c1a29239775589a81063952adac0aad82ab6c0ae..e61b75c6e925ecdb7c4681b2a410bac7f298c2a9 100644 (file)
@@ -50,7 +50,6 @@
 #include "stat-w32.h"
 
 #include "pathmax.h"
-#include "verify.h"
 
 /* Don't assume that UNICODE is not defined.  */
 #undef LoadLibrary
@@ -228,7 +227,7 @@ _gl_fstat_by_handle (HANDLE h, const char *path, struct stat *buf)
           if (GetFileInformationByHandleExFunc (h, FileIdInfo, &id, sizeof (id)))
             {
               buf->st_dev = id.VolumeSerialNumber;
-              verify (sizeof (ino_t) == sizeof (id.FileId));
+              static_assert (sizeof (ino_t) == sizeof (id.FileId));
               memcpy (&buf->st_ino, &id.FileId, sizeof (ino_t));
               goto ino_done;
             }
index cdcc33165f1329eda48a444e73078f8403066622..adb61233528b0a108945ea02e0267eb9458248ca 100644 (file)
@@ -58,7 +58,6 @@ orig_stat (const char *filename, struct stat *buf)
 #include <string.h>
 #include "filename.h"
 #include "malloca.h"
-#include "verify.h"
 
 #ifdef WINDOWS_NATIVE
 # define WIN32_LEAN_AND_MEAN
index 67c5216e2143fa43f9c57cb0d8dfa30bcd567cf3..1019fe9eb6097ae02daf081c39ec4965f12bec3b 100644 (file)
@@ -27,7 +27,6 @@
 
 #include "intprops.h"
 #include "strerror-override.h"
-#include "verify.h"
 
 /* Use the system functions, not the gnulib overrides in this file.  */
 #undef sprintf
@@ -55,7 +54,7 @@ strerror (int n)
   if (!msg || !*msg)
     {
       static char const fmt[] = "Unknown error %d";
-      verify (sizeof buf >= sizeof (fmt) + INT_STRLEN_BOUND (n));
+      static_assert (sizeof buf >= sizeof (fmt) + INT_STRLEN_BOUND (n));
       sprintf (buf, fmt, n);
       errno = EINVAL;
       return buf;
index cad12d0d9bedf14c99e35720e104cdba64b36b94..29d16d29cef426cc63f9909a7090bb7f858fbdfb 100644 (file)
@@ -25,8 +25,6 @@
 
 #include <stdlib.h>
 
-#include "verify.h"
-
 #ifdef UNSIGNED
 # ifndef HAVE_DECL_STRTOULL
 "this configure-time declaration test was not run"
@@ -62,8 +60,8 @@ long long int strtoll (char const *, char **, int);
 Int
 Strtoimax (char const *ptr, char **endptr, int base)
 {
-  verify (sizeof (Int) == sizeof (Unsigned long int)
-          || sizeof (Int) == sizeof (Unsigned long long int));
+  static_assert (sizeof (Int) == sizeof (Unsigned long int)
+                 || sizeof (Int) == sizeof (Unsigned long long int));
 
   if (sizeof (Int) != sizeof (Unsigned long int))
     return Strtoll (ptr, endptr, base);
index 7312ee0b887a4b55c391c01ef66656ea2f79907c..ae7729d26bee95a0bed83e0345f35814c1548dd5 100644 (file)
@@ -33,7 +33,6 @@
 #include "hash.h"
 #include "intprops.h"
 #include "stat-time.h"
-#include "verify.h"
 
 #ifndef MAX
 # define MAX(a, b) ((a) > (b) ? (a) : (b))
@@ -146,7 +145,7 @@ utimecmpat (int dfd, char const *dst_name,
 
      time_t might be unsigned.  */
 
-  verify (TYPE_IS_INTEGER (time_t));
+  static_assert (TYPE_IS_INTEGER (time_t));
 
   /* Destination and source timestamps.  */
   time_t dst_s = dst_stat->st_mtime;
index 285c674b9ccc8f21541c635e8bfb32f7b1967ac4..01d18bf598ab34e7602d275050dd26d7900ecf95 100644 (file)
 #include "xsize.h"
 
 #include "attribute.h"
-#include "verify.h"
 
 #if (NEED_PRINTF_DOUBLE || NEED_PRINTF_LONG_DOUBLE) && !defined IN_LIBINTL
 # include <math.h>
@@ -408,11 +407,11 @@ is_infinite_or_zerol (long double x)
 
 typedef unsigned int mp_limb_t;
 # define GMP_LIMB_BITS 32
-verify (sizeof (mp_limb_t) * CHAR_BIT == GMP_LIMB_BITS);
+static_assert (sizeof (mp_limb_t) * CHAR_BIT == GMP_LIMB_BITS);
 
 typedef unsigned long long mp_twolimb_t;
 # define GMP_TWOLIMB_BITS 64
-verify (sizeof (mp_twolimb_t) * CHAR_BIT == GMP_TWOLIMB_BITS);
+static_assert (sizeof (mp_twolimb_t) * CHAR_BIT == GMP_TWOLIMB_BITS);
 
 /* Representation of a bignum >= 0.  */
 typedef struct
@@ -2628,7 +2627,7 @@ VASNPRINTF (DCHAR_T *resultbuf, size_t *lengthp,
                   size_t characters;
 #  if !DCHAR_IS_TCHAR
                   /* This code assumes that TCHAR_T is 'char'.  */
-                  verify (sizeof (TCHAR_T) == 1);
+                  static_assert (sizeof (TCHAR_T) == 1);
                   TCHAR_T *tmpsrc;
                   DCHAR_T *tmpdst;
                   size_t tmpdst_len;
@@ -2894,7 +2893,7 @@ VASNPRINTF (DCHAR_T *resultbuf, size_t *lengthp,
                   size_t characters;
 # if !DCHAR_IS_TCHAR
                   /* This code assumes that TCHAR_T is 'char'.  */
-                  verify (sizeof (TCHAR_T) == 1);
+                  static_assert (sizeof (TCHAR_T) == 1);
                   TCHAR_T tmpsrc[64]; /* Assume MB_CUR_MAX <= 64.  */
                   DCHAR_T *tmpdst;
                   size_t tmpdst_len;
@@ -5451,7 +5450,7 @@ VASNPRINTF (DCHAR_T *resultbuf, size_t *lengthp,
                         DCHAR_T *tmpdst;
                         size_t tmpdst_len;
                         /* This code assumes that TCHAR_T is 'char'.  */
-                        verify (sizeof (TCHAR_T) == 1);
+                        static_assert (sizeof (TCHAR_T) == 1);
 # if USE_SNPRINTF
                         tmpsrc = (TCHAR_T *) (result + length);
 # else
index 42ca672bc2110fccf50e47c4d5119e4e6fa94bbf..0a34b4bcf494693ad485a101d40ca9f28a464592 100644 (file)
@@ -7,6 +7,7 @@ lib/alignalloc.c
 m4/alignalloc.m4
 
 Depends-on:
+assert-h
 extensions
 extern-inline
 idx
@@ -14,7 +15,6 @@ posix_memalign
 stdalign
 stdckdint
 stdint
-verify
 
 configure.ac:
 gl_ALIGNALLOC
index be4cb942bee19e4e85d4f25c3d91a8fb2f765efc..598351790e9313dfd3991893153de7fea6e33387 100644 (file)
@@ -2,7 +2,7 @@ Files:
 tests/test-alignof.c
 
 Depends-on:
-verify
+assert-h
 stdint
 
 configure.ac:
@@ -10,4 +10,3 @@ configure.ac:
 Makefile.am:
 TESTS += test-alignof
 check_PROGRAMS += test-alignof
-
index 97d84fbb93f453a2fb06000e5abac1baef4703cd..bd534f5056a06544a7c339bfd8e1ae8a5ce5cc1a 100644 (file)
@@ -6,6 +6,7 @@ lib/argmatch.h
 lib/argmatch.c
 
 Depends-on:
+assert-h
 c99
 error
 exitfail
@@ -16,7 +17,6 @@ quote
 quotearg
 stdbool
 stdlib
-verify
 
 configure.ac:
 
index f193f70856df03ad828de6946aac3895e609ba99..44259c1f0e602021800e54d1790a27c6774a444c 100644 (file)
@@ -22,6 +22,7 @@ m4/math_h.m4
 m4/exponentd.m4
 
 Depends-on:
+assert-h
 attribute
 stdio
 isnand-nolibm
@@ -39,7 +40,6 @@ xsize
 errno
 memchr
 multiarch
-verify
 
 configure.ac:
 AC_REQUIRE([AC_C_RESTRICT])
index b03ba7fbc3ab3767bfb9c0abc43be8efc232e67f..a6e42fefd4f7188b99e051ca36a5b9af63b1c6a4 100644 (file)
@@ -13,7 +13,7 @@ wctype-h
 localcharset    [test $REPLACE_MBSTATE_T = 1]
 streq           [test $REPLACE_MBSTATE_T = 1]
 unictype/ctype-alnum
-verify
+assert-h
 
 configure.ac:
 AC_REQUIRE([gl_UCHAR_H])
index d39e869471536c9d44fd1a41a05e4f82b709c971..8081cc2671303e5061bb234f06bf955ca4ea3d48 100644 (file)
@@ -13,7 +13,7 @@ wctype-h
 localcharset    [test $REPLACE_MBSTATE_T = 1]
 streq           [test $REPLACE_MBSTATE_T = 1]
 unictype/ctype-alpha
-verify
+assert-h
 
 configure.ac:
 AC_REQUIRE([gl_UCHAR_H])
index 948ae36212c579b77bec049b7dd11c9ebb80b960..1d3938b754e30eca991d50101565087ed6d4bfb3 100644 (file)
@@ -14,7 +14,7 @@ iswblank
 localcharset    [test $REPLACE_MBSTATE_T = 1]
 streq           [test $REPLACE_MBSTATE_T = 1]
 unictype/ctype-blank
-verify
+assert-h
 
 configure.ac:
 AC_REQUIRE([gl_UCHAR_H])
index b3f1ac7dbb3ec8d4f20208cbf4e35e40eea82009..9ec924f96ac79924909f98a4a7a4ef5a7fdeafba 100644 (file)
@@ -13,7 +13,7 @@ wctype-h
 localcharset    [test $REPLACE_MBSTATE_T = 1]
 streq           [test $REPLACE_MBSTATE_T = 1]
 unictype/ctype-cntrl
-verify
+assert-h
 
 configure.ac:
 AC_REQUIRE([gl_UCHAR_H])
index 3b82dc91b2a06efb51ee5a8c9f5e99468ddf6446..a9449cd6b1f816928c517979b9212135f679487f 100644 (file)
@@ -14,7 +14,7 @@ iswdigit
 localcharset    [test $REPLACE_MBSTATE_T = 1]
 streq           [test $REPLACE_MBSTATE_T = 1]
 unictype/ctype-digit
-verify
+assert-h
 
 configure.ac:
 AC_REQUIRE([gl_UCHAR_H])
index 30dc8cb2cd6a189c791a8d26e9438ca61917ad1f..6d6ef2785ab2220e0c3a7cbbcd84f2991752b1a5 100644 (file)
@@ -13,7 +13,7 @@ wctype-h
 localcharset    [test $REPLACE_MBSTATE_T = 1]
 streq           [test $REPLACE_MBSTATE_T = 1]
 unictype/ctype-graph
-verify
+assert-h
 
 configure.ac:
 AC_REQUIRE([gl_UCHAR_H])
index eb075f3b80c732e6832de4bd70d52032a7d93457..165912563115dabcb604e085826f9741e831cefb 100644 (file)
@@ -13,7 +13,7 @@ wctype-h
 localcharset    [test $REPLACE_MBSTATE_T = 1]
 streq           [test $REPLACE_MBSTATE_T = 1]
 unictype/ctype-lower
-verify
+assert-h
 
 configure.ac:
 AC_REQUIRE([gl_UCHAR_H])
index db7bedc980e84d62628c29b440db37a395b0a218..96049e387813c18691bfbcf54d678e19869b3a19 100644 (file)
@@ -13,7 +13,7 @@ wctype-h
 localcharset    [test $REPLACE_MBSTATE_T = 1]
 streq           [test $REPLACE_MBSTATE_T = 1]
 unictype/ctype-print
-verify
+assert-h
 
 configure.ac:
 AC_REQUIRE([gl_UCHAR_H])
index 2b132dc0b4b0b8ed0813775da29f81e2150446c8..1e45a01a3815eec9917012d026c778f2de84eb16 100644 (file)
@@ -14,7 +14,7 @@ wctype-h
 localcharset    [test $REPLACE_MBSTATE_T = 1]
 streq           [test $REPLACE_MBSTATE_T = 1]
 unictype/ctype-punct
-verify
+assert-h
 
 configure.ac:
 AC_REQUIRE([gl_UCHAR_H])
index 144aa9b5fc966148c29a6c9c8ca84fc74c454b38..f72b6ec27be6f52b85224dee9473599a8750f440 100644 (file)
@@ -13,7 +13,7 @@ wctype-h
 localcharset    [test $REPLACE_MBSTATE_T = 1]
 streq           [test $REPLACE_MBSTATE_T = 1]
 unictype/ctype-space
-verify
+assert-h
 
 configure.ac:
 AC_REQUIRE([gl_UCHAR_H])
index 26bc18d51f5d741ce79b7292cda540515b601224..09d41ad2ec3fa1fa19841b698f231d8c15d8f63b 100644 (file)
@@ -13,7 +13,7 @@ wctype-h
 localcharset    [test $REPLACE_MBSTATE_T = 1]
 streq           [test $REPLACE_MBSTATE_T = 1]
 unictype/ctype-upper
-verify
+assert-h
 
 configure.ac:
 AC_REQUIRE([gl_UCHAR_H])
index f4f31c44d91bfcbfef25298c0c7a3d9c758064cd..2cc4b3e21b6192022496762cea8e9a0b02c80a8d 100644 (file)
@@ -15,7 +15,7 @@ iswxdigit
 localcharset    [test $REPLACE_MBSTATE_T = 1]
 streq           [test $REPLACE_MBSTATE_T = 1]
 unictype/ctype-xdigit
-verify
+assert-h
 
 configure.ac:
 AC_REQUIRE([gl_UCHAR_H])
index 4ced9f2628dd3604cfdd00c5efc94b518213437b..6edf7174ed6e313f3d054b33daee72cdd1e37521 100644 (file)
@@ -9,7 +9,7 @@ lib/c32srtombs-state.c
 Depends-on:
 uchar
 wchar
-verify
+assert-h
 c32rtomb
 wcsnrtombs      [test $SMALL_WCHAR_T = 0]
 
index 1f36b6cc66a8cc64d439ea32709d8c35fd3aec1d..4d82ab7bdc9ad2d3f4a5aa67267739b1943deee4 100644 (file)
@@ -9,7 +9,7 @@ lib/c32srtombs-state.c
 Depends-on:
 uchar
 wchar
-verify
+assert-h
 c32rtomb
 wcsrtombs       [test $SMALL_WCHAR_T = 0]
 
index 13871bd635e7facdee9a0602cf28e9a6ac69dfee..bd785cada9e2685b488546c122bf8a01c977f56c 100644 (file)
@@ -6,6 +6,7 @@ lib/exclude.h
 lib/exclude.c
 
 Depends-on:
+assert-h
 filename
 fnmatch
 fopen-gnu
@@ -15,7 +16,6 @@ mbuiter
 regex
 stdbool
 unlocked-io-internal
-verify
 xalloc
 
 configure.ac:
index 4786ce11b6dcf748a7d9f2904d5e82d8ff40df93..6c11bb7278c112d76cef287a7fe81631df4a0232 100644 (file)
@@ -6,10 +6,10 @@ lib/filevercmp.h
 lib/filevercmp.c
 
 Depends-on:
+assert-h
 c-ctype
 idx
 stdbool
-verify
 
 configure.ac:
 
index dc45a948262df3f05e75cf40ea357f1e9910ba83..14e841842db10eee6dd2fb9eab9dff698e7f3643 100644 (file)
@@ -12,7 +12,7 @@ Depends-on:
 math
 float           [test $HAVE_FMA = 0 || test $REPLACE_FMA = 1]
 stdbool         [test $HAVE_FMA = 0 || test $REPLACE_FMA = 1]
-verify          [test $HAVE_FMA = 0 || test $REPLACE_FMA = 1]
+assert-h        [test $HAVE_FMA = 0 || test $REPLACE_FMA = 1]
 isfinite        [test $HAVE_FMA = 0 || test $REPLACE_FMA = 1]
 integer_length  [test $HAVE_FMA = 0 || test $REPLACE_FMA = 1]
 frexp           [test $HAVE_FMA = 0 || test $REPLACE_FMA = 1]
index 53fe229c10aa8cd4df5589b5f11d446d63d9bcf1..8373d61bc5ee766b96564f5120d990b5367b74d3 100644 (file)
@@ -14,7 +14,7 @@ math
 extensions
 float           [test $HAVE_FMAF = 0 || test $REPLACE_FMAF = 1]
 stdbool         [test $HAVE_FMAF = 0 || test $REPLACE_FMAF = 1]
-verify          [test $HAVE_FMAF = 0 || test $REPLACE_FMAF = 1]
+assert-h         [test $HAVE_FMAF = 0 || test $REPLACE_FMAF = 1]
 isfinite        [test $HAVE_FMAF = 0 || test $REPLACE_FMAF = 1]
 integer_length  [test $HAVE_FMAF = 0 || test $REPLACE_FMAF = 1]
 frexpf          [test $HAVE_FMAF = 0 || test $REPLACE_FMAF = 1]
index e24ff02a95f08d3a7bcd461ae8cc6ef000534286..3927262e6a91f784f58bbcf08c29f597d25579b5 100644 (file)
@@ -15,7 +15,7 @@ extensions
 fma             [{ test $HAVE_FMAL = 0 || test $REPLACE_FMAL = 1; } && test $HAVE_SAME_LONG_DOUBLE_AS_DOUBLE = 1]
 float           [{ test $HAVE_FMAL = 0 || test $REPLACE_FMAL = 1; } && test $HAVE_SAME_LONG_DOUBLE_AS_DOUBLE = 0]
 stdbool         [{ test $HAVE_FMAL = 0 || test $REPLACE_FMAL = 1; } && test $HAVE_SAME_LONG_DOUBLE_AS_DOUBLE = 0]
-verify          [{ test $HAVE_FMAL = 0 || test $REPLACE_FMAL = 1; } && test $HAVE_SAME_LONG_DOUBLE_AS_DOUBLE = 0]
+assert-h        [{ test $HAVE_FMAL = 0 || test $REPLACE_FMAL = 1; } && test $HAVE_SAME_LONG_DOUBLE_AS_DOUBLE = 0]
 isfinite        [{ test $HAVE_FMAL = 0 || test $REPLACE_FMAL = 1; } && test $HAVE_SAME_LONG_DOUBLE_AS_DOUBLE = 0]
 integer_length  [{ test $HAVE_FMAL = 0 || test $REPLACE_FMAL = 1; } && test $HAVE_SAME_LONG_DOUBLE_AS_DOUBLE = 0]
 frexpl          [{ test $HAVE_FMAL = 0 || test $REPLACE_FMAL = 1; } && test $HAVE_SAME_LONG_DOUBLE_AS_DOUBLE = 0]
index 508aa76a228a0bfb320a5786e7c7448166de780e..394f2fa4ed351b5285718b0692a4952c463ff739 100644 (file)
@@ -14,7 +14,7 @@ pathmax         [test $REPLACE_FSTAT = 1]
 stat            [test $REPLACE_FSTAT = 1]
 stat-time       [test $REPLACE_FSTAT = 1]
 unistd          [test $REPLACE_FSTAT = 1]
-verify          [test $REPLACE_FSTAT = 1]
+assert-h        [test $REPLACE_FSTAT = 1]
 msvc-nothrow    [test $REPLACE_FSTAT = 1]
 
 configure.ac:
index 374970694b83de80c0dafe9fe4f7c8c3116bd924..1d23a9fe515c3731805a10d749643d020324968f 100644 (file)
@@ -7,8 +7,8 @@ lib/i-ring.c
 m4/i-ring.m4
 
 Depends-on:
+assert-h
 stdbool
-verify
 
 configure.ac:
 gl_I_RING
index c340d1ef4c8a9bfc6a3d1aa54ec50e0150706857..8905b2ae9c8192a99e543115ff821d1146a63e07 100644 (file)
@@ -6,8 +6,8 @@ lib/ino-map.c
 lib/ino-map.h
 
 Depends-on:
+assert-h
 hash
-verify
 
 configure.ac:
 
index f02b357584ee26adce863839af98076643b295a8..1a230ccde8421460c293672c0d4d5b4783c2464c 100644 (file)
@@ -3,9 +3,9 @@ tests/test-intprops.c
 tests/macros.h
 
 Depends-on:
+assert-h
 inttypes
 stdbool
-verify
 
 configure.ac:
 
index a80c478c7732aa2571c0c14a538df9fbb3517cc1..b0cb73d1f458bfad854ed982b176fb0c0f86ef61 100644 (file)
@@ -3,8 +3,8 @@ tests/macros.h
 tests/test-libgmp.c
 
 Depends-on:
+assert-h
 c99
-verify
 
 configure.ac:
 
index 7a70e5782b5043ae3b632f89dcc2aeecf91e2f4a..2cf0a41f5dc4c34a812bb9b0bb9438e0361d0c95 100644 (file)
@@ -2,8 +2,8 @@ Files:
 tests/test-limits-h.c
 
 Depends-on:
+assert-h
 extensions
-verify
 limits-h-c++-tests
 
 configure.ac:
index 2e661f75657af27dc1bcac3e6b35321ccd666706..11b840da9adb6386f08bbcaa4f26964b17c33b25 100644 (file)
@@ -2,7 +2,7 @@ Files:
 tests/test-locale.c
 
 Depends-on:
-verify
+assert-h
 locale-c++-tests
 
 configure.ac:
index 9c279c45f13cafceb00b09726923695dfed44fe3..6e5fc8d5663fc681c9bdf634b8e5b0748c43016a 100644 (file)
@@ -9,10 +9,10 @@ m4/eealloc.m4
 
 Depends-on:
 alloca-opt
+assert-h
 idx
 stdckdint
 stdint
-verify
 xalloc-oversized
 
 configure.ac:
index 63ed5ebe1fad8620964172e71167661be9106983..4757bcbe02743fd86a42942629587edab7ac6d51 100644 (file)
@@ -22,9 +22,9 @@ attribute       [test $HAVE_MBRTOC32 = 0 || test $REPLACE_MBRTOC32 = 1]
 c99             [{ test $HAVE_MBRTOC32 = 0 || test $REPLACE_MBRTOC32 = 1; } && test $REPLACE_MBSTATE_T = 0]
 hard-locale     [{ test $HAVE_MBRTOC32 = 0 || test $REPLACE_MBRTOC32 = 1; } && test $REPLACE_MBSTATE_T = 0]
 mbrtowc         [{ test $HAVE_MBRTOC32 = 0 || test $REPLACE_MBRTOC32 = 1; } && test $REPLACE_MBSTATE_T = 0]
+assert-h        [test $HAVE_MBRTOC32 = 0 || test $REPLACE_MBRTOC32 = 1]
 localcharset    [test $HAVE_MBRTOC32 = 0 || test $REPLACE_MBRTOC32 = 1]
 streq           [test $HAVE_MBRTOC32 = 0 || test $REPLACE_MBRTOC32 = 1]
-verify          [test $HAVE_MBRTOC32 = 0 || test $REPLACE_MBRTOC32 = 1]
 
 configure.ac:
 gl_FUNC_MBRTOC32
index ed9ebd715200e908591218d5b6f0696783119a4c..e81da6f350cd27f7418758cff9286cd321f6d38c 100644 (file)
@@ -26,9 +26,9 @@ attribute       [test $HAVE_MBRTOWC = 0 || test $REPLACE_MBRTOWC = 1]
 stdint          [test $HAVE_MBRTOWC = 0 || test $REPLACE_MBRTOWC = 1]
 hard-locale     [{ test $HAVE_MBRTOWC = 0 || test $REPLACE_MBRTOWC = 1; } && test $REPLACE_MBSTATE_T = 0]
 mbsinit         [{ test $HAVE_MBRTOWC = 0 || test $REPLACE_MBRTOWC = 1; } && test $REPLACE_MBSTATE_T = 0]
+assert-h        [test $HAVE_MBRTOWC = 0 || test $REPLACE_MBRTOWC = 1]
 localcharset    [test $HAVE_MBRTOWC = 0 || test $REPLACE_MBRTOWC = 1]
 streq           [test $HAVE_MBRTOWC = 0 || test $REPLACE_MBRTOWC = 1]
-verify          [test $HAVE_MBRTOWC = 0 || test $REPLACE_MBRTOWC = 1]
 
 configure.ac:
 gl_FUNC_MBRTOWC
index c500620b4033e39aefde5a3d200ef3eabc11f380..104006822341ef70aa11ed9801e7876a99ae014c 100644 (file)
@@ -9,8 +9,8 @@ m4/mbstate_t.m4
 Depends-on:
 wchar
 extensions
+assert-h        [test $HAVE_MBSINIT = 0 || test $REPLACE_MBSINIT = 1]
 mbrtowc         [test $HAVE_MBSINIT = 0 || test $REPLACE_MBSINIT = 1]
-verify          [test $HAVE_MBSINIT = 0 || test $REPLACE_MBSINIT = 1]
 
 configure.ac:
 gl_FUNC_MBSINIT
index ac464a89505d3bc700ba93fa8347a7da8a27df2d..24a8458f3f3ad8a9f3cd65b2d0a7733ace153581 100644 (file)
@@ -9,7 +9,7 @@ lib/mbsrtoc32s-state.c
 Depends-on:
 uchar
 wchar
-verify
+assert-h
 mbrtoc32
 minmax
 strnlen1
index 64892cf2a7b8791af3dbb8c8fea8f70105d03c3a..f9d97d7548d027f5207217d5ec1976aaebaed521 100644 (file)
@@ -9,7 +9,7 @@ lib/mbsrtoc32s-state.c
 Depends-on:
 uchar
 wchar
-verify
+assert-h
 mbrtoc32
 strnlen1
 mbsrtowcs       [test $SMALL_WCHAR_T = 0]
index a8d0c76744ade222fd38fddd9f9ae1151d7cfb19..d0855460cd7822f063c1866ec32c44fa7301f008 100644 (file)
@@ -9,11 +9,11 @@ Depends-on:
 time
 extensions
 multiarch
+assert-h        [test $HAVE_NANOSLEEP = 0 || test $REPLACE_NANOSLEEP = 1]
 intprops        [test $HAVE_NANOSLEEP = 0 || test $REPLACE_NANOSLEEP = 1]
 pselect         [test $HAVE_NANOSLEEP = 0 || test $REPLACE_NANOSLEEP = 1]
 stdbool         [test $HAVE_NANOSLEEP = 0 || test $REPLACE_NANOSLEEP = 1]
 sys_select      [test $HAVE_NANOSLEEP = 0 || test $REPLACE_NANOSLEEP = 1]
-verify          [test $HAVE_NANOSLEEP = 0 || test $REPLACE_NANOSLEEP = 1]
 
 configure.ac:
 gl_FUNC_NANOSLEEP
index 8a2d050deeb1ea2179f8f59089bfbd91cc78a18a..72aa6af659deda7ccd7f72ea484adf4d26f19dd7 100644 (file)
@@ -9,6 +9,7 @@ m4/tm_gmtoff.m4
 m4/parse-datetime.m4
 
 Depends-on:
+assert-h
 bison
 c99
 c-ctype
@@ -26,7 +27,6 @@ time
 time_r
 time_rz
 timegm
-verify
 
 configure.ac:
 gl_PARSE_DATETIME
index 08758ba77aabc71cd21c6f128f4663fb49d9f2a6..a933d626f014d2317a082db29405b22557de5b53 100644 (file)
@@ -10,7 +10,7 @@ unistd
 fcntl-h
 binary-io
 extensions
-verify
+assert-h
 
 configure.ac:
 gl_FUNC_PIPE2
index 13fd05b3a016d5f8b78072fac96e08c107cbcaad..962ff0e7ca22ec50d0283849e83a76e75ad794f2 100644 (file)
@@ -2,7 +2,7 @@ Files:
 tests/test-pthread.c
 
 Depends-on:
-verify
+assert-h
 pthread-h-c++-tests
 
 configure.ac:
index f3e46881d5952ad6752a10ef7d4f57094e710b0e..03da3a27b7aac891cfd86a25d82a30a74cf61dc9 100644 (file)
@@ -7,11 +7,11 @@ lib/rawmemchr.valgrind
 m4/rawmemchr.m4
 
 Depends-on:
+assert-h
 extensions
 stdalign
 stdint
 string
-verify
 
 configure.ac:
 gl_FUNC_RAWMEMCHR
index 9b9d9c3abe6a10937aa9a59d066845ed4508f691..a60aa24d677bf0580c73aff0f79217ff50c88ee8 100644 (file)
@@ -51,6 +51,7 @@ m4/relocatable-lib.m4
 m4/setenv.m4
 
 Depends-on:
+assert-h
 c99
 double-slash-root
 eloop-threshold
@@ -73,7 +74,6 @@ stdlib
 string
 sys_stat
 unistd
-verify
 xalloc-oversized
 
 configure.ac-early:
index 2c4b37bf6ee7d528a8a296e52df73f9e392a8012..6a0de71cf7850893c14f151d38b83a04ac5e8521 100644 (file)
@@ -8,10 +8,10 @@ tests/signature.h
 tests/macros.h
 
 Depends-on:
+assert-h
 isnand-nolibm
 stdbool
 stdint
-verify
 
 configure.ac:
 
index cd8af3020299ac1df8cd428d36abe740544de5b2..29f06e45c2b591dcb4c8818da2c2f4cca45938a0 100644 (file)
@@ -9,12 +9,12 @@ tests/signature.h
 tests/macros.h
 
 Depends-on:
+assert-h
 ceilf
 floorf
 isnanf-nolibm
 stdbool
 stdint
-verify
 
 configure.ac:
 
index 8ce74a43d90a2b1ca3e918f10e23be715845bc14..fb81ebd6832444f956df8cb5e744aa343ba0b6e5 100644 (file)
@@ -7,8 +7,8 @@ m4/sleep.m4
 
 Depends-on:
 unistd
+assert-h        [test $HAVE_SLEEP = 0 || test $REPLACE_SLEEP = 1]
 stdint          [test $HAVE_SLEEP = 0 || test $REPLACE_SLEEP = 1]
-verify          [test $HAVE_SLEEP = 0 || test $REPLACE_SLEEP = 1]
 
 configure.ac:
 gl_FUNC_SLEEP
index 96d7a03fd54f8298792ed66c0ac45c23cec6d58f..0d01ab60550ded1a6e7474eaef8843811de054fc 100644 (file)
@@ -10,12 +10,12 @@ m4/stat.m4
 Depends-on:
 sys_stat
 largefile
+assert-h        [test $REPLACE_STAT = 1]
 filename        [test $REPLACE_STAT = 1]
 malloca         [test $REPLACE_STAT = 1]
 pathmax         [test $REPLACE_STAT = 1]
 stat-time       [test $REPLACE_STAT = 1]
 stdbool         [test $REPLACE_STAT = 1]
-verify          [test $REPLACE_STAT = 1]
 
 configure.ac:
 gl_FUNC_STAT
index 138fe3550e47f285b81e832b7ff3925cbdb1c2b5..e4665ed5fcca8e7d5bdbd0a0d1ccbcc5aa909e0f 100644 (file)
@@ -3,7 +3,7 @@ tests/test-stdalign.c
 tests/macros.h
 
 Depends-on:
-verify
+assert-h
 stdint
 stdalign-c++-tests
 
index fb809dac3ec964257929d2331c7d9f8df03c7284..a4115ca44b92003999c96d8c04528036d7591469 100644 (file)
@@ -4,9 +4,9 @@ tests/test-intprops.c
 tests/test-stdckdint.c
 
 Depends-on:
+assert-h
 inttypes
 stdbool
-verify
 stdckdint-c++-tests
 
 configure.ac:
index bb71e110b7ad0e3fb285b475e83c51aed58c56b9..644eb0d7aa02f70863000a74b455a807393aea6c 100644 (file)
@@ -2,8 +2,8 @@ Files:
 tests/test-stddef.c
 
 Depends-on:
+assert-h
 stdalign
-verify
 stddef-c++-tests
 
 configure.ac:
index fcda690b7aa705ff8e43d19c5fd0a657e9a1a945..5368a2c64c03ab9a9cffb00c1c83d15b3ae6e055 100644 (file)
@@ -2,7 +2,7 @@ Files:
 tests/test-stdio.c
 
 Depends-on:
-verify
+assert-h
 stdio-c++-tests
 fgetc-tests
 fputc-tests
index 7225c65b8b409e6bfae96345911c4a90492bd5ae..f7184bb4e14f001d3440dd6c7786ea52260acd6a 100644 (file)
@@ -3,7 +3,7 @@ tests/test-stdlib.c
 tests/test-sys_wait.h
 
 Depends-on:
-verify
+assert-h
 stdlib-c++-tests
 
 configure.ac:
index 6ed290e9299637546261f2380d68f3049823c70b..acd17dee0a526f027eac42f8824377e769a215fe 100644 (file)
@@ -7,10 +7,10 @@ m4/strerror.m4
 
 Depends-on:
 string
+assert-h         [test $REPLACE_STRERROR = 1]
 errno            [test $REPLACE_STRERROR = 1]
 intprops         [test $REPLACE_STRERROR = 1]
 strerror-override [test $REPLACE_STRERROR = 1]
-verify           [test $REPLACE_STRERROR = 1]
 
 configure.ac:
 gl_FUNC_STRERROR
index ec732da6a3e327a830c07a258c4aaaee48598b32..b469c2e048fd563c0934e58927def24ec6935284 100644 (file)
@@ -2,7 +2,7 @@ Files:
 tests/test-string.c
 
 Depends-on:
-verify
+assert-h
 string-c++-tests
 
 configure.ac:
index 80aa1dde65abcfa2c181d7bfcc5336d168c1753e..942fb55a18ddb7aca0e2715569f1cefb879b7c00 100644 (file)
@@ -7,7 +7,7 @@ m4/strtoimax.m4
 
 Depends-on:
 inttypes-incomplete
-verify          [test $HAVE_DECL_STRTOIMAX = 0 || test $REPLACE_STRTOIMAX = 1]
+assert-h        [test $HAVE_DECL_STRTOIMAX = 0 || test $REPLACE_STRTOIMAX = 1]
 stdint          [test $HAVE_DECL_STRTOIMAX = 0 || test $REPLACE_STRTOIMAX = 1]
 strtoll         [{ test $HAVE_DECL_STRTOIMAX = 0 || test $REPLACE_STRTOIMAX = 1; } && test $ac_cv_type_long_long_int = yes]
 
index 3d6bbf72818087e819502b344008a285f81e2130..5dfdd65ea28f752688440e789eaad4f43cd31fe7 100644 (file)
@@ -8,7 +8,7 @@ m4/strtoumax.m4
 
 Depends-on:
 inttypes-incomplete
-verify          [test $HAVE_DECL_STRTOUMAX = 0 || test $REPLACE_STRTOUMAX = 1]
+assert-h        [test $HAVE_DECL_STRTOUMAX = 0 || test $REPLACE_STRTOUMAX = 1]
 stdint          [test $HAVE_DECL_STRTOUMAX = 0 || test $REPLACE_STRTOUMAX = 1]
 strtoull        [{ test $HAVE_DECL_STRTOUMAX = 0 || test $REPLACE_STRTOUMAX = 1; } && test $ac_cv_type_unsigned_long_long_int = yes]
 
index a5ede77aba858b4be7ba881d0ae10ca93cd616ae..7d4091bd75bc3bf5e547e70cfdc321dfcf5f8318 100644 (file)
@@ -2,7 +2,7 @@ Files:
 tests/test-sys_stat.c
 
 Depends-on:
-verify
+assert-h
 sys_stat-c++-tests
 
 configure.ac:
index de7e2383c851ccf4593fc9d97436ce41e5ee89ed..e367565ece7e64297718285e073ca71edb179b64 100644 (file)
@@ -2,7 +2,7 @@ Files:
 tests/test-time.c
 
 Depends-on:
-verify
+assert-h
 time-c++-tests
 
 configure.ac:
index 2dab71805bcfce0e70268ec648c7f87d9ccf1d76..5df13a09a4a29707b0f3a7eab767d2854bb0f5c3 100644 (file)
@@ -2,7 +2,7 @@ Files:
 tests/test-uchar.c
 
 Depends-on:
-verify
+assert-h
 uchar-c++-tests
 
 configure.ac:
index 9b8222c604d8d49b51f0da290d85130411aa9822..e9ce6e0a3d3abe77b5944abc70b6fc8df1e99fca 100644 (file)
@@ -2,7 +2,7 @@ Files:
 tests/test-unistd.c
 
 Depends-on:
-verify
+assert-h
 unistd-c++-tests
 
 configure.ac:
index 9c27ccc7f57c4fae7647c6fa91ce91b778fc7cbc..ac8df9f1b117061d4bed8f6fc2241a9574ba51a1 100644 (file)
@@ -47,7 +47,7 @@ errno
 free-posix
 memchr
 multiarch
-verify
+assert-h
 
 configure.ac:
 gl_PREREQ_VASNPRINTF_WITH_EXTRAS
index 285640b6ead1d4f0f0452473e8870e0067b3c16c..e767f54bd3d03d2bc202f2ac9ca05b0935797548 100644 (file)
@@ -47,7 +47,7 @@ errno
 free-posix
 memchr
 multiarch
-verify
+assert-h
 
 configure.ac:
 gl_PREREQ_VASNPRINTF_WITH_EXTRAS
index c4fe86d61df0b6394dd9297cfbf78e6f7d61eab9..86e669723b8c5aebed09425225882b73164ae977 100644 (file)
@@ -47,7 +47,7 @@ errno
 free-posix
 memchr
 multiarch
-verify
+assert-h
 
 configure.ac:
 gl_PREREQ_VASNPRINTF_WITH_EXTRAS
index a7582ff922e5214e9db4758311af07ed4b8dbc45..58185bc34bdb8c0eacb6f168c58ddaa44b773e12 100644 (file)
@@ -47,7 +47,7 @@ errno
 free-posix
 memchr
 multiarch
-verify
+assert-h
 
 configure.ac:
 gl_PREREQ_VASNPRINTF_WITH_EXTRAS
index a583f3442d56d08895351972b0ca5f95294fb8e9..63ab8d876815c4d7a8a9d6366d0b08bcf35b2d20 100644 (file)
@@ -47,7 +47,7 @@ errno
 free-posix
 memchr
 multiarch
-verify
+assert-h
 
 configure.ac:
 gl_PREREQ_VASNPRINTF_WITH_EXTRAS
index 3fdaa9ce38a4285d7af1d11d8ff4e8d1b8742db5..f6be0a5de3bc51f03fd52b300c4e7174166103ec 100644 (file)
@@ -47,7 +47,7 @@ errno
 free-posix
 memchr
 multiarch
-verify
+assert-h
 
 configure.ac:
 gl_PREREQ_VASNPRINTF_WITH_EXTRAS
index 56910070190e5b385f2591af9a974c0b64fa0516..61107fe13a56c914c927d776f585073ad1aa4f9f 100644 (file)
@@ -45,7 +45,7 @@ errno
 free-posix
 memchr
 multiarch
-verify
+assert-h
 
 configure.ac:
 gl_PREREQ_VASNPRINTF_WITH_EXTRAS
index dffe861c2d136c1b9bd538ac35ef773ee284a55e..af6b8c2898d72f6bc29f7f0bdadfd7c59d764bb9 100644 (file)
@@ -16,7 +16,7 @@ utimensat
 intprops
 stdbool
 stdint
-verify
+assert-h
 
 configure.ac:
 gl_UTIMECMP
index bcde2b9cfdfdc8dd4db96a5245cb008174caee65..7d40973cdb813040318ea4913a956f222cb400de 100644 (file)
@@ -30,7 +30,7 @@ stdint
 xsize
 errno
 memchr
-verify
+assert-h
 wchar
 
 configure.ac:
index afe3bff7522b7142180448efc89bb083ccd25d13..3e6b6cf3f77d4409e115cd9a85e9c49be46de031 100644 (file)
@@ -2,7 +2,7 @@ Files:
 tests/test-wchar.c
 
 Depends-on:
-verify
+assert-h
 wchar-c++-tests
 
 configure.ac:
index fd11789932b1b7d2e15c30c84e22eef0edd13655..0e516f5d1bc22804abab72a22abb70ff6ae8ff08 100644 (file)
@@ -23,8 +23,6 @@
 #include <stddef.h>
 #include <stdint.h>
 
-#include "verify.h"
-
 typedef long double longdouble;
 typedef struct { char a[1]; } struct1;
 typedef struct { char a[2]; } struct2;
@@ -33,7 +31,7 @@ typedef struct { char a[4]; } struct4;
 
 #define CHECK(type) \
   typedef struct { char slot1; type slot2; } type##_helper; \
-  verify (alignof_slot (type) == offsetof (type##_helper, slot2)); \
+  static_assert (alignof_slot (type) == offsetof (type##_helper, slot2)); \
   const int type##_slot_alignment = alignof_slot (type); \
   const int type##_type_alignment = alignof_type (type);
 
index 84265ea3f266d9e589e43ee0d9baa3a9ceb04aa9..a54d581229dcbf992cc1f3df0fa66a5ce14157bc 100644 (file)
@@ -35,7 +35,6 @@
 #else
 # include "intprops.h"
 #endif
-#include "verify.h"
 
 #include <inttypes.h>
 #include <limits.h>
@@ -44,7 +43,7 @@
 
 /* Compile-time verification of expression X.
    In this file, we need it as a statement, rather than as a declaration.  */
-#define verify_stmt(x) do { verify (x); } while (0)
+#define verify_stmt(x) do { static_assert (x); } while (0)
 
 /* VERIFY (X) uses a static assertion for compilers that are known to work,
    and falls back on a dynamic assertion for other compilers.
index fcb77d38851c9b60ee8c5a9d32135463e6230384..ec1766affde1e45b597dcf882954b5d054543c23 100644 (file)
 #include <limits.h>
 #include <string.h>
 
-#include "verify.h"
-
 #include "macros.h"
 
 #ifndef MINI_GMP_LIMB_TYPE
 /* Verify that the gmp.h header file was generated for the same
    machine word size as we are using.  */
-verify (GMP_NUMB_BITS == sizeof (mp_limb_t) * CHAR_BIT);
+static_assert (GMP_NUMB_BITS == sizeof (mp_limb_t) * CHAR_BIT);
 #endif
 
 int
index 5da02f0575033874e8f7b9ea0204654e88670e09..ddcb5d56484b06d3d477a116be1002031a467158 100644 (file)
 
 #include <limits.h>
 
-#include "verify.h"
-
 #if 4 < __GNUC__ + (3 <= __GNUC_MINOR__)
 # pragma GCC diagnostic ignored "-Woverlength-strings"
 #endif
 
 #define verify_width(width, min, max) \
-  verify ((max) >> ((width) - 1 - ((min) < 0)) == 1)
+  static_assert ((max) >> ((width) - 1 - ((min) < 0)) == 1)
 
 /* Macros borrowed from intprops.h.  */
 #define TYPE_SIGNED(t) (! ((t) 0 < (t) -1))
@@ -53,48 +51,48 @@ verify_width (LONG_BIT, LONG_MIN, LONG_MAX);
 /* Numerical limit macros.  */
 
 char               limits1[]  = { CHAR_MIN, CHAR_MAX };
-verify (TYPE_MINIMUM (char) == CHAR_MIN);
-verify (TYPE_MAXIMUM (char) == CHAR_MAX);
+static_assert (TYPE_MINIMUM (char) == CHAR_MIN);
+static_assert (TYPE_MAXIMUM (char) == CHAR_MAX);
 
 signed char        limits2[]  = { SCHAR_MIN, SCHAR_MAX };
-verify (TYPE_MINIMUM (signed char) == SCHAR_MIN);
-verify (TYPE_MAXIMUM (signed char) == SCHAR_MAX);
+static_assert (TYPE_MINIMUM (signed char) == SCHAR_MIN);
+static_assert (TYPE_MAXIMUM (signed char) == SCHAR_MAX);
 
 unsigned char      limits3[]  = { UCHAR_MAX };
-verify (TYPE_MINIMUM (unsigned char) == 0);
-verify (TYPE_MAXIMUM (unsigned char) == UCHAR_MAX);
+static_assert (TYPE_MINIMUM (unsigned char) == 0);
+static_assert (TYPE_MAXIMUM (unsigned char) == UCHAR_MAX);
 
 short              limits4[]  = { SHRT_MIN, SHRT_MAX };
-verify (TYPE_MINIMUM (short int) == SHRT_MIN);
-verify (TYPE_MAXIMUM (short int) == SHRT_MAX);
+static_assert (TYPE_MINIMUM (short int) == SHRT_MIN);
+static_assert (TYPE_MAXIMUM (short int) == SHRT_MAX);
 
 unsigned short     limits5[]  = { USHRT_MAX };
-verify (TYPE_MINIMUM (unsigned short int) == 0);
-verify (TYPE_MAXIMUM (unsigned short int) == USHRT_MAX);
+static_assert (TYPE_MINIMUM (unsigned short int) == 0);
+static_assert (TYPE_MAXIMUM (unsigned short int) == USHRT_MAX);
 
 int                limits6[]  = { INT_MIN, INT_MAX };
-verify (TYPE_MINIMUM (int) == INT_MIN);
-verify (TYPE_MAXIMUM (int) == INT_MAX);
+static_assert (TYPE_MINIMUM (int) == INT_MIN);
+static_assert (TYPE_MAXIMUM (int) == INT_MAX);
 
 unsigned int       limits7[]  = { UINT_MAX };
-verify (TYPE_MINIMUM (unsigned int) == 0);
-verify (TYPE_MAXIMUM (unsigned int) == UINT_MAX);
+static_assert (TYPE_MINIMUM (unsigned int) == 0);
+static_assert (TYPE_MAXIMUM (unsigned int) == UINT_MAX);
 
 long               limits8[]  = { LONG_MIN, LONG_MAX };
-verify (TYPE_MINIMUM (long int) == LONG_MIN);
-verify (TYPE_MAXIMUM (long int) == LONG_MAX);
+static_assert (TYPE_MINIMUM (long int) == LONG_MIN);
+static_assert (TYPE_MAXIMUM (long int) == LONG_MAX);
 
 unsigned long      limits9[]  = { ULONG_MAX };
-verify (TYPE_MINIMUM (unsigned long int) == 0);
-verify (TYPE_MAXIMUM (unsigned long int) == ULONG_MAX);
+static_assert (TYPE_MINIMUM (unsigned long int) == 0);
+static_assert (TYPE_MAXIMUM (unsigned long int) == ULONG_MAX);
 
 long long          limits10[] = { LLONG_MIN, LLONG_MAX };
-verify (TYPE_MINIMUM (long long int) == LLONG_MIN);
-verify (TYPE_MAXIMUM (long long int) == LLONG_MAX);
+static_assert (TYPE_MINIMUM (long long int) == LLONG_MIN);
+static_assert (TYPE_MAXIMUM (long long int) == LLONG_MAX);
 
 unsigned long long limits11[] = { ULLONG_MAX };
-verify (TYPE_MINIMUM (unsigned long long int) == 0);
-verify (TYPE_MAXIMUM (unsigned long long int) == ULLONG_MAX);
+static_assert (TYPE_MINIMUM (unsigned long long int) == 0);
+static_assert (TYPE_MAXIMUM (unsigned long long int) == ULLONG_MAX);
 
 /* Macros specified by ISO/IEC TS 18661-1:2014.  */
 
@@ -113,7 +111,7 @@ verify_width (ULLONG_WIDTH, 0, ULLONG_MAX);
 /* Macros specified by C2x.  */
 
 int bool_attrs[] = { BOOL_MAX, BOOL_WIDTH };
-verify (BOOL_MAX == (((1U << (BOOL_WIDTH - 1)) - 1) * 2) + 1);
+static_assert (BOOL_MAX == (((1U << (BOOL_WIDTH - 1)) - 1) * 2) + 1);
 
 int
 main (void)
index 5c2bac1009169561296ff5aca017c9ebdbdadf2d..3aad7d85a8e4224edc959a48c1a9aa11de08d6ed 100644 (file)
@@ -20,8 +20,6 @@
 
 #include <locale.h>
 
-#include "verify.h"
-
 int a[] =
   {
     LC_ALL,
@@ -39,7 +37,7 @@ int ls;
 
 /* Check that NULL can be passed through varargs as a pointer type,
    per POSIX 2008.  */
-verify (sizeof NULL == sizeof (void *));
+static_assert (sizeof NULL == sizeof (void *));
 
 int
 main ()
index 86131d867ad8895bf32f2f567500f9abd6527020..2fef5924e87b2d3082796a81ee361eda37d9c1a9 100644 (file)
@@ -20,8 +20,6 @@
 
 #include <pthread.h>
 
-#include "verify.h"
-
 /* Check that the types are all defined.  */
 
 pthread_t t1;
index 4cc37c59bf9f5b1d58c53f6025a07320008adfbe..05600eab7c0eff09d3977658e2e7e99a39310040 100644 (file)
@@ -34,8 +34,6 @@
 #include <stdio.h>
 #include <stdlib.h>
 
-#include "verify.h"
-
 #ifdef USE_LONG_DOUBLE
 # error Long double not supported.
 #elif ! defined USE_FLOAT
@@ -99,7 +97,7 @@ main (void)
         /* Combine highbits and lowbits into a floating-point number,
            sign-extending the lowbits to DOUBLE_BITS-NUM_HIGHBITS bits.  */
         union { DOUBLE f; DOUBLE_UINT i; } janus;
-        verify (sizeof janus.f == sizeof janus.i);
+        static_assert (sizeof janus.f == sizeof janus.i);
         janus.i = lowbits | (highbits << (DOUBLE_BITS - NUM_HIGHBITS));
         if (lowbits >> (NUM_LOWBITS - 1))
           janus.i |= ((DOUBLE_UINT) -1
index 69268b87b4e9143f0dca61461c45cbfa049acd22..ea07543802a461081bad17377d88fa403a9fd67a 100644 (file)
@@ -23,8 +23,6 @@
 #include <stddef.h>
 #include <stdint.h>
 
-#include "verify.h"
-
 #include "macros.h"
 
 typedef long double longdouble;
@@ -45,7 +43,7 @@ typedef struct { char a[4]; } struct4;
 
 #define CHECK_STATIC(type) \
   typedef struct { char slot1; type slot2; } type##_helper; \
-  verify (alignof (type) == offsetof (type##_helper, slot2)); \
+  static_assert (alignof (type) == offsetof (type##_helper, slot2)); \
   const int type##_alignment = alignof (type); \
   type alignas (TEST_ALIGNMENT) static_##type##_alignas
 
index 9983154e92c4ca7d0009189c57a7e353f9f45734..470c7a6bc1a0202bd1a97527e33addbd836ab53c 100644 (file)
@@ -21,7 +21,6 @@
 #include <stddef.h>
 #include <limits.h>
 #include <stdalign.h>
-#include "verify.h"
 
 /* Check that appropriate types are defined.  */
 wchar_t a = 'c';
@@ -31,7 +30,7 @@ max_align_t x;
 
 /* Check that NULL can be passed through varargs as a pointer type,
    per POSIX 2008.  */
-verify (sizeof NULL == sizeof (void *));
+static_assert (sizeof NULL == sizeof (void *));
 
 /* Check that offsetof produces integer constants with correct type.  */
 struct d
@@ -42,32 +41,32 @@ struct d
 /* Solaris 10 has a bug where offsetof is under-parenthesized, and
    cannot be used as an arbitrary expression.  However, since it is
    unlikely to bite real code, we ignore that short-coming.  */
-/* verify (sizeof offsetof (struct d, e) == sizeof (size_t)); */
-verify (sizeof (offsetof (struct d, e)) == sizeof (size_t));
-verify (offsetof (struct d, f) == 1);
+/* static_assert (sizeof offsetof (struct d, e) == sizeof (size_t)); */
+static_assert (sizeof (offsetof (struct d, e)) == sizeof (size_t));
+static_assert (offsetof (struct d, f) == 1);
 
 /* offsetof promotes to an unsigned integer if and only if sizes do
    not fit in int.  */
-verify ((offsetof (struct d, e) < -1) == (INT_MAX < (size_t) -1));
+static_assert ((offsetof (struct d, e) < -1) == (INT_MAX < (size_t) -1));
 
 /* Check max_align_t's alignment.  */
-verify (alignof (double) <= alignof (max_align_t));
-verify (alignof (int) <= alignof (max_align_t));
-verify (alignof (long double) <= alignof (max_align_t));
-verify (alignof (long int) <= alignof (max_align_t));
-verify (alignof (ptrdiff_t) <= alignof (max_align_t));
-verify (alignof (size_t) <= alignof (max_align_t));
-verify (alignof (wchar_t) <= alignof (max_align_t));
-verify (alignof (struct d) <= alignof (max_align_t));
+static_assert (alignof (double) <= alignof (max_align_t));
+static_assert (alignof (int) <= alignof (max_align_t));
+static_assert (alignof (long double) <= alignof (max_align_t));
+static_assert (alignof (long int) <= alignof (max_align_t));
+static_assert (alignof (ptrdiff_t) <= alignof (max_align_t));
+static_assert (alignof (size_t) <= alignof (max_align_t));
+static_assert (alignof (wchar_t) <= alignof (max_align_t));
+static_assert (alignof (struct d) <= alignof (max_align_t));
 #if defined __GNUC__ || defined __clang__ || defined __IBM__ALIGNOF__
-verify (__alignof__ (double) <= __alignof__ (max_align_t));
-verify (__alignof__ (int) <= __alignof__ (max_align_t));
-verify (__alignof__ (long double) <= __alignof__ (max_align_t));
-verify (__alignof__ (long int) <= __alignof__ (max_align_t));
-verify (__alignof__ (ptrdiff_t) <= __alignof__ (max_align_t));
-verify (__alignof__ (size_t) <= __alignof__ (max_align_t));
-verify (__alignof__ (wchar_t) <= __alignof__ (max_align_t));
-verify (__alignof__ (struct d) <= __alignof__ (max_align_t));
+static_assert (__alignof__ (double) <= __alignof__ (max_align_t));
+static_assert (__alignof__ (int) <= __alignof__ (max_align_t));
+static_assert (__alignof__ (long double) <= __alignof__ (max_align_t));
+static_assert (__alignof__ (long int) <= __alignof__ (max_align_t));
+static_assert (__alignof__ (ptrdiff_t) <= __alignof__ (max_align_t));
+static_assert (__alignof__ (size_t) <= __alignof__ (max_align_t));
+static_assert (__alignof__ (wchar_t) <= __alignof__ (max_align_t));
+static_assert (__alignof__ (struct d) <= __alignof__ (max_align_t));
 #endif
 
 int
index 695532ad95374f917e74b5ebfb7a5f2babbcccfa..1908da358a89ff4e23825e724b608e09ecf11bf4 100644 (file)
 
 #include <stdio.h>
 
-#include "verify.h"
-
 /* Check that the various SEEK_* macros are defined.  */
 int sk[] = { SEEK_CUR, SEEK_END, SEEK_SET };
 
 /* Check that NULL can be passed through varargs as a pointer type,
    per POSIX 2008.  */
-verify (sizeof NULL == sizeof (void *));
+static_assert (sizeof NULL == sizeof (void *));
 
 /* Check that the types are all defined.  */
 fpos_t t1;
index 4f1b96581808a75b8aff2c03ce3e9ec665ca34ba..4fdafc994681f6c3d5d870bce6d6369e2ea9cee6 100644 (file)
@@ -20,8 +20,6 @@
 
 #include <stdlib.h>
 
-#include "verify.h"
-
 /* Check that EXIT_SUCCESS is 0, per POSIX.  */
 static int exitcode = EXIT_SUCCESS;
 #if EXIT_SUCCESS
@@ -36,7 +34,7 @@ static int exitcode = EXIT_SUCCESS;
 
 /* Check that NULL can be passed through varargs as a pointer type,
    per POSIX 2008.  */
-verify (sizeof NULL == sizeof (void *));
+static_assert (sizeof NULL == sizeof (void *));
 
 #if GNULIB_TEST_SYSTEM_POSIX
 # include "test-sys_wait.h"
index 9509a6a5d9e899576b5f9fc4bfa21058c817f7cf..94688726dd0f4c09e5056991aa3ad6491bdd22df 100644 (file)
 
 #include <string.h>
 
-#include "verify.h"
-
 /* Check that NULL can be passed through varargs as a pointer type,
    per POSIX 2008.  */
-verify (sizeof NULL == sizeof (void *));
+static_assert (sizeof NULL == sizeof (void *));
 
 int
 main (void)
index 913b17e99507e587bb52f731218e4c3c6dc20427..b404d9f22cd9aac01e5a3ddd55ad929f9242beb1 100644 (file)
@@ -20,8 +20,6 @@
 
 #include <sys/stat.h>
 
-#include "verify.h"
-
 /* Check the existence of some macros.  */
 int a[] =
   {
@@ -61,264 +59,264 @@ int a[] =
 
 /* Sanity checks.  */
 
-verify (S_IRWXU == (S_IRUSR | S_IWUSR | S_IXUSR));
-verify (S_IRWXG == (S_IRGRP | S_IWGRP | S_IXGRP));
-verify (S_IRWXO == (S_IROTH | S_IWOTH | S_IXOTH));
+static_assert (S_IRWXU == (S_IRUSR | S_IWUSR | S_IXUSR));
+static_assert (S_IRWXG == (S_IRGRP | S_IWGRP | S_IXGRP));
+static_assert (S_IRWXO == (S_IROTH | S_IWOTH | S_IXOTH));
 
 #ifdef S_IFBLK
-verify (S_ISBLK (S_IFBLK));
+static_assert (S_ISBLK (S_IFBLK));
 #endif
-verify (!S_ISBLK (S_IFCHR));
-verify (!S_ISBLK (S_IFDIR));
-verify (!S_ISBLK (S_IFIFO));
-verify (!S_ISBLK (S_IFREG));
+static_assert (!S_ISBLK (S_IFCHR));
+static_assert (!S_ISBLK (S_IFDIR));
+static_assert (!S_ISBLK (S_IFIFO));
+static_assert (!S_ISBLK (S_IFREG));
 #ifdef S_IFLNK
-verify (!S_ISBLK (S_IFLNK));
+static_assert (!S_ISBLK (S_IFLNK));
 #endif
 #ifdef S_IFSOCK
-verify (!S_ISBLK (S_IFSOCK));
+static_assert (!S_ISBLK (S_IFSOCK));
 #endif
 
 #ifdef S_IFBLK
-verify (!S_ISCHR (S_IFBLK));
+static_assert (!S_ISCHR (S_IFBLK));
 #endif
-verify (S_ISCHR (S_IFCHR));
-verify (!S_ISCHR (S_IFDIR));
-verify (!S_ISCHR (S_IFIFO));
-verify (!S_ISCHR (S_IFREG));
+static_assert (S_ISCHR (S_IFCHR));
+static_assert (!S_ISCHR (S_IFDIR));
+static_assert (!S_ISCHR (S_IFIFO));
+static_assert (!S_ISCHR (S_IFREG));
 #ifdef S_IFLNK
-verify (!S_ISCHR (S_IFLNK));
+static_assert (!S_ISCHR (S_IFLNK));
 #endif
 #ifdef S_IFSOCK
-verify (!S_ISCHR (S_IFSOCK));
+static_assert (!S_ISCHR (S_IFSOCK));
 #endif
 
 #ifdef S_IFBLK
-verify (!S_ISDIR (S_IFBLK));
+static_assert (!S_ISDIR (S_IFBLK));
 #endif
-verify (!S_ISDIR (S_IFCHR));
-verify (S_ISDIR (S_IFDIR));
-verify (!S_ISDIR (S_IFIFO));
-verify (!S_ISDIR (S_IFREG));
+static_assert (!S_ISDIR (S_IFCHR));
+static_assert (S_ISDIR (S_IFDIR));
+static_assert (!S_ISDIR (S_IFIFO));
+static_assert (!S_ISDIR (S_IFREG));
 #ifdef S_IFLNK
-verify (!S_ISDIR (S_IFLNK));
+static_assert (!S_ISDIR (S_IFLNK));
 #endif
 #ifdef S_IFSOCK
-verify (!S_ISDIR (S_IFSOCK));
+static_assert (!S_ISDIR (S_IFSOCK));
 #endif
 
 #ifdef S_IFBLK
-verify (!S_ISFIFO (S_IFBLK));
+static_assert (!S_ISFIFO (S_IFBLK));
 #endif
-verify (!S_ISFIFO (S_IFCHR));
-verify (!S_ISFIFO (S_IFDIR));
-verify (S_ISFIFO (S_IFIFO));
-verify (!S_ISFIFO (S_IFREG));
+static_assert (!S_ISFIFO (S_IFCHR));
+static_assert (!S_ISFIFO (S_IFDIR));
+static_assert (S_ISFIFO (S_IFIFO));
+static_assert (!S_ISFIFO (S_IFREG));
 #ifdef S_IFLNK
-verify (!S_ISFIFO (S_IFLNK));
+static_assert (!S_ISFIFO (S_IFLNK));
 #endif
 #ifdef S_IFSOCK
-verify (!S_ISFIFO (S_IFSOCK));
+static_assert (!S_ISFIFO (S_IFSOCK));
 #endif
 
 #ifdef S_IFBLK
-verify (!S_ISREG (S_IFBLK));
+static_assert (!S_ISREG (S_IFBLK));
 #endif
-verify (!S_ISREG (S_IFCHR));
-verify (!S_ISREG (S_IFDIR));
-verify (!S_ISREG (S_IFIFO));
-verify (S_ISREG (S_IFREG));
+static_assert (!S_ISREG (S_IFCHR));
+static_assert (!S_ISREG (S_IFDIR));
+static_assert (!S_ISREG (S_IFIFO));
+static_assert (S_ISREG (S_IFREG));
 #ifdef S_IFLNK
-verify (!S_ISREG (S_IFLNK));
+static_assert (!S_ISREG (S_IFLNK));
 #endif
 #ifdef S_IFSOCK
-verify (!S_ISREG (S_IFSOCK));
+static_assert (!S_ISREG (S_IFSOCK));
 #endif
 
 #ifdef S_IFBLK
-verify (!S_ISLNK (S_IFBLK));
+static_assert (!S_ISLNK (S_IFBLK));
 #endif
-verify (!S_ISLNK (S_IFCHR));
-verify (!S_ISLNK (S_IFDIR));
-verify (!S_ISLNK (S_IFIFO));
-verify (!S_ISLNK (S_IFREG));
+static_assert (!S_ISLNK (S_IFCHR));
+static_assert (!S_ISLNK (S_IFDIR));
+static_assert (!S_ISLNK (S_IFIFO));
+static_assert (!S_ISLNK (S_IFREG));
 #ifdef S_IFLNK
-verify (S_ISLNK (S_IFLNK));
+static_assert (S_ISLNK (S_IFLNK));
 #endif
 #ifdef S_IFSOCK
-verify (!S_ISLNK (S_IFSOCK));
+static_assert (!S_ISLNK (S_IFSOCK));
 #endif
 
 #ifdef S_IFBLK
-verify (!S_ISSOCK (S_IFBLK));
+static_assert (!S_ISSOCK (S_IFBLK));
 #endif
-verify (!S_ISSOCK (S_IFCHR));
-verify (!S_ISSOCK (S_IFDIR));
-verify (!S_ISSOCK (S_IFIFO));
-verify (!S_ISSOCK (S_IFREG));
+static_assert (!S_ISSOCK (S_IFCHR));
+static_assert (!S_ISSOCK (S_IFDIR));
+static_assert (!S_ISSOCK (S_IFIFO));
+static_assert (!S_ISSOCK (S_IFREG));
 #ifdef S_IFLNK
-verify (!S_ISSOCK (S_IFLNK));
+static_assert (!S_ISSOCK (S_IFLNK));
 #endif
 #ifdef S_IFSOCK
-verify (S_ISSOCK (S_IFSOCK));
+static_assert (S_ISSOCK (S_IFSOCK));
 #endif
 
 #ifdef S_IFBLK
-verify (!S_ISDOOR (S_IFBLK));
+static_assert (!S_ISDOOR (S_IFBLK));
 #endif
-verify (!S_ISDOOR (S_IFCHR));
-verify (!S_ISDOOR (S_IFDIR));
-verify (!S_ISDOOR (S_IFIFO));
-verify (!S_ISDOOR (S_IFREG));
+static_assert (!S_ISDOOR (S_IFCHR));
+static_assert (!S_ISDOOR (S_IFDIR));
+static_assert (!S_ISDOOR (S_IFIFO));
+static_assert (!S_ISDOOR (S_IFREG));
 #ifdef S_IFLNK
-verify (!S_ISDOOR (S_IFLNK));
+static_assert (!S_ISDOOR (S_IFLNK));
 #endif
 #ifdef S_IFSOCK
-verify (!S_ISDOOR (S_IFSOCK));
+static_assert (!S_ISDOOR (S_IFSOCK));
 #endif
 
 #ifdef S_IFBLK
-verify (!S_ISMPB (S_IFBLK));
+static_assert (!S_ISMPB (S_IFBLK));
 #endif
-verify (!S_ISMPB (S_IFCHR));
-verify (!S_ISMPB (S_IFDIR));
-verify (!S_ISMPB (S_IFIFO));
-verify (!S_ISMPB (S_IFREG));
+static_assert (!S_ISMPB (S_IFCHR));
+static_assert (!S_ISMPB (S_IFDIR));
+static_assert (!S_ISMPB (S_IFIFO));
+static_assert (!S_ISMPB (S_IFREG));
 #ifdef S_IFLNK
-verify (!S_ISMPB (S_IFLNK));
+static_assert (!S_ISMPB (S_IFLNK));
 #endif
 #ifdef S_IFSOCK
-verify (!S_ISMPB (S_IFSOCK));
+static_assert (!S_ISMPB (S_IFSOCK));
 #endif
 
 #ifdef S_IFBLK
-verify (!S_ISMPX (S_IFBLK));
+static_assert (!S_ISMPX (S_IFBLK));
 #endif
-verify (!S_ISMPX (S_IFCHR));
-verify (!S_ISMPX (S_IFDIR));
-verify (!S_ISMPX (S_IFIFO));
-verify (!S_ISMPX (S_IFREG));
+static_assert (!S_ISMPX (S_IFCHR));
+static_assert (!S_ISMPX (S_IFDIR));
+static_assert (!S_ISMPX (S_IFIFO));
+static_assert (!S_ISMPX (S_IFREG));
 #ifdef S_IFLNK
-verify (!S_ISMPX (S_IFLNK));
+static_assert (!S_ISMPX (S_IFLNK));
 #endif
 #ifdef S_IFSOCK
-verify (!S_ISMPX (S_IFSOCK));
+static_assert (!S_ISMPX (S_IFSOCK));
 #endif
 
 #ifdef S_IFBLK
-verify (!S_ISNAM (S_IFBLK));
+static_assert (!S_ISNAM (S_IFBLK));
 #endif
-verify (!S_ISNAM (S_IFCHR));
-verify (!S_ISNAM (S_IFDIR));
-verify (!S_ISNAM (S_IFIFO));
-verify (!S_ISNAM (S_IFREG));
+static_assert (!S_ISNAM (S_IFCHR));
+static_assert (!S_ISNAM (S_IFDIR));
+static_assert (!S_ISNAM (S_IFIFO));
+static_assert (!S_ISNAM (S_IFREG));
 #ifdef S_IFLNK
-verify (!S_ISNAM (S_IFLNK));
+static_assert (!S_ISNAM (S_IFLNK));
 #endif
 #ifdef S_IFSOCK
-verify (!S_ISNAM (S_IFSOCK));
+static_assert (!S_ISNAM (S_IFSOCK));
 #endif
 
 #ifdef S_IFBLK
-verify (!S_ISNWK (S_IFBLK));
+static_assert (!S_ISNWK (S_IFBLK));
 #endif
-verify (!S_ISNWK (S_IFCHR));
-verify (!S_ISNWK (S_IFDIR));
-verify (!S_ISNWK (S_IFIFO));
-verify (!S_ISNWK (S_IFREG));
+static_assert (!S_ISNWK (S_IFCHR));
+static_assert (!S_ISNWK (S_IFDIR));
+static_assert (!S_ISNWK (S_IFIFO));
+static_assert (!S_ISNWK (S_IFREG));
 #ifdef S_IFLNK
-verify (!S_ISNWK (S_IFLNK));
+static_assert (!S_ISNWK (S_IFLNK));
 #endif
 #ifdef S_IFSOCK
-verify (!S_ISNWK (S_IFSOCK));
+static_assert (!S_ISNWK (S_IFSOCK));
 #endif
 
 #ifdef S_IFBLK
-verify (!S_ISPORT (S_IFBLK));
+static_assert (!S_ISPORT (S_IFBLK));
 #endif
-verify (!S_ISPORT (S_IFCHR));
-verify (!S_ISPORT (S_IFDIR));
-verify (!S_ISPORT (S_IFIFO));
-verify (!S_ISPORT (S_IFREG));
+static_assert (!S_ISPORT (S_IFCHR));
+static_assert (!S_ISPORT (S_IFDIR));
+static_assert (!S_ISPORT (S_IFIFO));
+static_assert (!S_ISPORT (S_IFREG));
 #ifdef S_IFLNK
-verify (!S_ISPORT (S_IFLNK));
+static_assert (!S_ISPORT (S_IFLNK));
 #endif
 #ifdef S_IFSOCK
-verify (!S_ISPORT (S_IFSOCK));
+static_assert (!S_ISPORT (S_IFSOCK));
 #endif
 
 #ifdef S_IFBLK
-verify (!S_ISCTG (S_IFBLK));
+static_assert (!S_ISCTG (S_IFBLK));
 #endif
-verify (!S_ISCTG (S_IFCHR));
-verify (!S_ISCTG (S_IFDIR));
-verify (!S_ISCTG (S_IFIFO));
-verify (!S_ISCTG (S_IFREG));
+static_assert (!S_ISCTG (S_IFCHR));
+static_assert (!S_ISCTG (S_IFDIR));
+static_assert (!S_ISCTG (S_IFIFO));
+static_assert (!S_ISCTG (S_IFREG));
 #ifdef S_IFLNK
-verify (!S_ISCTG (S_IFLNK));
+static_assert (!S_ISCTG (S_IFLNK));
 #endif
 #ifdef S_IFSOCK
-verify (!S_ISCTG (S_IFSOCK));
+static_assert (!S_ISCTG (S_IFSOCK));
 #endif
 
 #ifdef S_IFBLK
-verify (!S_ISOFD (S_IFBLK));
+static_assert (!S_ISOFD (S_IFBLK));
 #endif
-verify (!S_ISOFD (S_IFCHR));
-verify (!S_ISOFD (S_IFDIR));
-verify (!S_ISOFD (S_IFIFO));
-verify (!S_ISOFD (S_IFREG));
+static_assert (!S_ISOFD (S_IFCHR));
+static_assert (!S_ISOFD (S_IFDIR));
+static_assert (!S_ISOFD (S_IFIFO));
+static_assert (!S_ISOFD (S_IFREG));
 #ifdef S_IFLNK
-verify (!S_ISOFD (S_IFLNK));
+static_assert (!S_ISOFD (S_IFLNK));
 #endif
 #ifdef S_IFSOCK
-verify (!S_ISOFD (S_IFSOCK));
+static_assert (!S_ISOFD (S_IFSOCK));
 #endif
 
 #ifdef S_IFBLK
-verify (!S_ISOFL (S_IFBLK));
+static_assert (!S_ISOFL (S_IFBLK));
 #endif
-verify (!S_ISOFL (S_IFCHR));
-verify (!S_ISOFL (S_IFDIR));
-verify (!S_ISOFL (S_IFIFO));
-verify (!S_ISOFL (S_IFREG));
+static_assert (!S_ISOFL (S_IFCHR));
+static_assert (!S_ISOFL (S_IFDIR));
+static_assert (!S_ISOFL (S_IFIFO));
+static_assert (!S_ISOFL (S_IFREG));
 #ifdef S_IFLNK
-verify (!S_ISOFL (S_IFLNK));
+static_assert (!S_ISOFL (S_IFLNK));
 #endif
 #ifdef S_IFSOCK
-verify (!S_ISOFL (S_IFSOCK));
+static_assert (!S_ISOFL (S_IFSOCK));
 #endif
 
 #ifdef S_IFBLK
-verify (!S_ISWHT (S_IFBLK));
+static_assert (!S_ISWHT (S_IFBLK));
 #endif
-verify (!S_ISWHT (S_IFCHR));
-verify (!S_ISWHT (S_IFDIR));
-verify (!S_ISWHT (S_IFIFO));
-verify (!S_ISWHT (S_IFREG));
+static_assert (!S_ISWHT (S_IFCHR));
+static_assert (!S_ISWHT (S_IFDIR));
+static_assert (!S_ISWHT (S_IFIFO));
+static_assert (!S_ISWHT (S_IFREG));
 #ifdef S_IFLNK
-verify (!S_ISWHT (S_IFLNK));
+static_assert (!S_ISWHT (S_IFLNK));
 #endif
 #ifdef S_IFSOCK
-verify (!S_ISWHT (S_IFSOCK));
+static_assert (!S_ISWHT (S_IFSOCK));
 #endif
 
 /* POSIX 2008 requires traditional encoding of permission constants.  */
-verify (S_IRWXU == 00700);
-verify (S_IRUSR == 00400);
-verify (S_IWUSR == 00200);
-verify (S_IXUSR == 00100);
-verify (S_IRWXG == 00070);
-verify (S_IRGRP == 00040);
-verify (S_IWGRP == 00020);
-verify (S_IXGRP == 00010);
-verify (S_IRWXO == 00007);
-verify (S_IROTH == 00004);
-verify (S_IWOTH == 00002);
-verify (S_IXOTH == 00001);
-verify (S_ISUID == 04000);
-verify (S_ISGID == 02000);
-verify (S_ISVTX == 01000);
+static_assert (S_IRWXU == 00700);
+static_assert (S_IRUSR == 00400);
+static_assert (S_IWUSR == 00200);
+static_assert (S_IXUSR == 00100);
+static_assert (S_IRWXG == 00070);
+static_assert (S_IRGRP == 00040);
+static_assert (S_IWGRP == 00020);
+static_assert (S_IXGRP == 00010);
+static_assert (S_IRWXO == 00007);
+static_assert (S_IROTH == 00004);
+static_assert (S_IWOTH == 00002);
+static_assert (S_IXOTH == 00001);
+static_assert (S_ISUID == 04000);
+static_assert (S_ISGID == 02000);
+static_assert (S_ISVTX == 01000);
 
 #if ((0 <= UTIME_NOW && UTIME_NOW < 1000000000)           \
      || (0 <= UTIME_OMIT && UTIME_OMIT < 1000000000)      \
index 3c00a4ef04fe39d29328e78e417bf11fb41f066f..6b69f3d529a9aaee19581f589795255aac998887 100644 (file)
@@ -20,8 +20,6 @@
 
 #include <time.h>
 
-#include "verify.h"
-
 /* Check that the types are all defined.  */
 struct timespec t1;
 #if 0
@@ -32,11 +30,11 @@ pid_t t2;
 
 /* Check that NULL can be passed through varargs as a pointer type,
    per POSIX 2008.  */
-verify (sizeof NULL == sizeof (void *));
+static_assert (sizeof NULL == sizeof (void *));
 
 /* Check that TIME_UTC is defined and a positive integer.  */
 int t3 = TIME_UTC;
-verify (TIME_UTC > 0);
+static_assert (TIME_UTC > 0);
 
 int
 main (void)
index a2af51c52354ab30056c0405471a4dfc2e265a77..ad83d8ad91acd6f46e7c12302e0118e16602b861 100644 (file)
@@ -20,8 +20,6 @@
 
 #include <uchar.h>
 
-#include "verify.h"
-
 /* Check that the types are defined.  */
 mbstate_t a = { 0 };
 size_t b = 5;
@@ -29,19 +27,19 @@ char16_t c = 'x';
 char32_t d = 'y';
 
 /* Check that char16_t and char32_t are unsigned types.  */
-verify ((char16_t)(-1) >= 0);
+static_assert ((char16_t)(-1) >= 0);
 #if !defined __HP_cc
-verify ((char32_t)(-1) >= 0);
+static_assert ((char32_t)(-1) >= 0);
 #endif
 
 /* Check that char32_t is at least 31 bits wide.  */
-verify ((char32_t)0x7FFFFFFF != (char32_t)0x3FFFFFFF);
+static_assert ((char32_t)0x7FFFFFFF != (char32_t)0x3FFFFFFF);
 
 /* Check that _GL_LARGE_CHAR32_T is correctly defined.  */
 #if _GL_LARGE_CHAR32_T
-verify (sizeof (char32_t) > sizeof (wchar_t));
+static_assert (sizeof (char32_t) > sizeof (wchar_t));
 #else
-verify (sizeof (char32_t) == sizeof (wchar_t));
+static_assert (sizeof (char32_t) == sizeof (wchar_t));
 #endif
 
 int
index 2c04b286ea72503b125caddb747442bcc381974c..a59af1e3ff24c8ef785253357c0f7f9cb22eb39f 100644 (file)
 
 #include <unistd.h>
 
-#include "verify.h"
-
 /* Check that NULL can be passed through varargs as a pointer type,
    per POSIX 2008.  */
-verify (sizeof NULL == sizeof (void *));
+static_assert (sizeof NULL == sizeof (void *));
 
 /* Check that the various SEEK_* macros are defined.  */
 int sk[] = { SEEK_CUR, SEEK_END, SEEK_SET };
index 97c3bfb3b3ae1ffb625a005bc2fba4968be259e0..af7c948601fdf1a164343500c941b34f01813cef 100644 (file)
 
 #include <wchar.h>
 
-#include "verify.h"
-
 /* Check that the types wchar_t and wint_t are defined.  */
 wchar_t a = 'c';
 wint_t b = 'x';
 
 /* Check that NULL can be passed through varargs as a pointer type,
    per POSIX 2008.  */
-verify (sizeof NULL == sizeof (void *));
+static_assert (sizeof NULL == sizeof (void *));
 
 int
 main (void)