bug-gnulib@gnu.org mirror (unofficial)
 help / color / mirror / Atom feed
From: Paul Eggert <eggert@cs.ucla.edu>
To: bug-gnulib@gnu.org
Cc: Paul Eggert <eggert@cs.ucla.edu>
Subject: [PATCH 3/3] verify: remove verify_true
Date: Thu,  9 May 2019 09:10:34 -0700	[thread overview]
Message-ID: <20190509161034.14248-3-eggert@cs.ucla.edu> (raw)
In-Reply-To: <20190509161034.14248-1-eggert@cs.ucla.edu>

* 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  <eggert@cs.ucla.edu>
 
+	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



  parent reply	other threads:[~2019-05-09 16:13 UTC|newest]

Thread overview: 5+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2019-05-09 16:10 [PATCH 1/3] Fix _GL_HAVE__STATIC_ASSERT typo Paul Eggert
2019-05-09 16:10 ` [PATCH 2/3] Support C2X and C++17 static_assert Paul Eggert
2019-05-09 16:10 ` Paul Eggert [this message]
2019-06-18 22:26   ` [PATCH 3/3] verify: remove verify_true Bruno Haible
2019-06-19  0:52     ` Paul Eggert

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

  List information: https://lists.gnu.org/mailman/listinfo/bug-gnulib

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=20190509161034.14248-3-eggert@cs.ucla.edu \
    --to=eggert@cs.ucla.edu \
    --cc=bug-gnulib@gnu.org \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).