[Top][All Lists]
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
Re: [bug-gnulib] Re: proposal: lib/verify.h
From: |
Paul Eggert |
Subject: |
Re: [bug-gnulib] Re: proposal: lib/verify.h |
Date: |
Mon, 11 Jul 2005 16:29:29 -0700 |
User-agent: |
Gnus/5.1007 (Gnus v5.10.7) Emacs/21.4 (gnu/linux) |
Bruno Haible <address@hidden> writes:
> However, Jim's first version with the NULL pointer works in C++ too:
>
> #define verify_expr(R) (void) ((verify_type__ (R) *) 0)
>
> I'd therefore suggest to use this one.
Thanks for catching that; I followed your suggestion in coreutils.
2005-07-11 Paul Eggert <address@hidden>
* verify.h (verify_expr): Use ((verify_type__ (R) *) 0), not
sizeof (verify_type__ (R)), to pacify C++ compilers. Problem
reported by Bruno Haible.
--- verify.h.~1.4.~ 2005-07-05 00:33:50.000000000 -0700
+++ verify.h 2005-07-11 16:13:59.000000000 -0700
@@ -52,6 +52,6 @@
This macro can be used in some contexts where verify cannot, and vice versa.
Return void. */
-# define verify_expr(R) ((void) sizeof (verify_type__ (R)))
+# define verify_expr(R) ((void) ((verify_type__ (R) *) 0))
#endif