Bruno Haible <[EMAIL PROTECTED]> 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 <[EMAIL PROTECTED]> * 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 _______________________________________________ bug-gnulib mailing list bug-gnulib@gnu.org http://lists.gnu.org/mailman/listinfo/bug-gnulib