This is the mail archive of the
gcc-bugs@gcc.gnu.org
mailing list for the GCC project.
[Bug c++/19542] attribute(sentinel) has problems with C++ __null
- From: "marcus at jet dot franken dot de" <gcc-bugzilla at gcc dot gnu dot org>
- To: gcc-bugs at gcc dot gnu dot org
- Date: 20 Jan 2005 13:44:45 -0000
- Subject: [Bug c++/19542] attribute(sentinel) has problems with C++ __null
- References: <20050120095136.19542.marcus@jet.franken.de>
- Reply-to: gcc-bugzilla at gcc dot gnu dot org
------- Additional Comments From marcus at jet dot franken dot de 2005-01-20 13:44 -------
well, i am not specifying the NULL, the code actually has "NULL".
However it gets defined by the gcc stdef.h file:
#if defined (_STDDEF_H) || defined (__need_NULL)
#undef NULL /* in case <stdio.h> has defined it. */
#ifdef __GNUG__
#define NULL __null
#else /* G++ */
#ifndef __cplusplus
#define NULL ((void *)0)
#else /* C++ */
#define NULL 0
#endif /* C++ */
#endif /* G++ */
#endif /* NULL not defined and <stddef.h> or need NULL. */
#undef __need_NULL
So:
- is gcc wrong?
- should the code always use (type*)NULL in such vararg lists?
--
What |Removed |Added
----------------------------------------------------------------------------
Status|RESOLVED |UNCONFIRMED
Resolution|INVALID |
http://gcc.gnu.org/bugzilla/show_bug.cgi?id=19542