bug-gnulib
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

[PATCH 3/3] verify: remove verify_true


From: Paul Eggert
Subject: [PATCH 3/3] verify: remove verify_true
Date: Thu, 9 May 2019 09:10:34 -0700

* NEWS: Mention this.
* lib/verify.h (verify_true): Remove.
* tests/test-verify.c (item): Test verify_expr, not verify_true.
---
 ChangeLog           |  5 +++++
 NEWS                |  2 ++
 lib/verify.h        | 13 +++----------
 tests/test-verify.c |  2 +-
 4 files changed, 11 insertions(+), 11 deletions(-)

diff --git a/ChangeLog b/ChangeLog
index 760cde3c6..10c513cb6 100644
--- a/ChangeLog
+++ b/ChangeLog
@@ -1,5 +1,10 @@
 2019-05-09  Paul Eggert  <address@hidden>
 
+       verify: remove verify_true
+       * NEWS: Mention this.
+       * lib/verify.h (verify_true): Remove.
+       * tests/test-verify.c (item): Test verify_expr, not verify_true.
+
        Support C2X and C++17 static_assert
        C2X and C++17 finally added support for a simple, single-argument
        ‘static_assert’ that implements what the Gnulib ‘verify’ macro was
diff --git a/NEWS b/NEWS
index 77b9f24a7..2655d7fc9 100644
--- a/NEWS
+++ b/NEWS
@@ -55,6 +55,8 @@ User visible incompatible changes
 
 Date        Modules         Changes
 
+2019-05-90  verify          verify_true (deprecated 2011-06-15) is removed.
+
 2019-02-02  c-strtod        This and related modules no longer define
                             the HAVE_C99_STRTOLD macro.  Programs requiring
                             standard strtold should use the strtold module.
diff --git a/lib/verify.h b/lib/verify.h
index d7e15bc8a..f8e4eff02 100644
--- a/lib/verify.h
+++ b/lib/verify.h
@@ -149,9 +149,9 @@
      which do not support _Static_assert, also do not warn about the
      last declaration mentioned above.
 
-   * GCC warns if -Wnested-externs is enabled and verify() is used
+   * GCC warns if -Wnested-externs is enabled and 'verify' is used
      within a function body; but inside a function, you can always
-     arrange to use verify_expr() instead.
+     arrange to use verify_expr instead.
 
    * In C++, any struct definition inside sizeof is invalid.
      Use a template type to work around the problem.  */
@@ -235,17 +235,10 @@ template <int w>
    assert (R), there is no run-time overhead.
 
    There are two macros, since no single macro can be used in all
-   contexts in C.  verify_true (R) is for scalar contexts, including
+   contexts in C.  verify_expr (R, E) is for scalar contexts, including
    integer constant expression contexts.  verify (R) is for declaration
    contexts, e.g., the top level.  */
 
-/* Verify requirement R at compile-time, as an integer constant expression.
-   Return 1.  This is equivalent to verify_expr (R, 1).
-
-   verify_true is obsolescent; please use verify_expr instead.  */
-
-#define verify_true(R) _GL_VERIFY_TRUE (R)
-
 /* Verify requirement R at compile-time.  Return the value of the
    expression E.  */
 
diff --git a/tests/test-verify.c b/tests/test-verify.c
index e677d8aff..0afbcabde 100644
--- a/tests/test-verify.c
+++ b/tests/test-verify.c
@@ -39,7 +39,7 @@ verify (1 == 1); verify (1 == 1); /* should be ok */
 
 enum
 {
-  item = verify_true (1 == 1) * 0 + 17 /* should be ok */
+  item = verify_expr (1 == 1, 10) * 0 + 17 /* should be ok */
 };
 
 static int
-- 
2.21.0




reply via email to

[Prev in Thread] Current Thread [Next in Thread]