This is the mail archive of the
gcc@gcc.gnu.org
mailing list for the GCC project.
RE: Warning for unadorned 0 in varargs lists?
- From: "Joseph S. Myers" <jsm at polyomino dot org dot uk>
- To: Dave Korn <dk at artimi dot com>
- Cc: "'Kaveh R. Ghazi'" <ghazi at caip dot rutgers dot edu>, hueffner at informatik dot uni-tuebingen dot de, espie at quatramaran dot ens dot fr, gcc at gcc dot gnu dot org, segher at kernel dot crashing dot org
- Date: Mon, 23 Aug 2004 16:27:06 +0000 (UTC)
- Subject: RE: Warning for unadorned 0 in varargs lists?
- References: <NUTMEGiGXix4A2DreBB00000edd@NUTMEG.CAM.ARTIMI.COM>
On Mon, 23 Aug 2004, Dave Korn wrote:
> But the C language spec says that an integer constant zero must compare
> equal to a null pointer.
Comparing equal does not mean being interchangable as arguments to
variadic functions that use va_arg.
Being interchangable as arguments to functions using va_arg does not mean
being interchangable as arguments to standard variadic functions; this,
however, is probably a defect. (See comp.std.c passim and
<http://www.srcf.ucam.org/~jsm28/gcc/pre-dr-6.txt>.)
--
Joseph S. Myers http://www.srcf.ucam.org/~jsm28/gcc/
jsm@polyomino.org.uk (personal mail)
jsm28@gcc.gnu.org (Bugzilla assignments and CCs)