This is the mail archive of the
gcc-bugs@gcc.gnu.org
mailing list for the GCC project.
[Bug c++/18886] attribute sentinel doesn't work with C++
- From: "joseph at codesourcery dot com" <gcc-bugzilla at gcc dot gnu dot org>
- To: gcc-bugs at gcc dot gnu dot org
- Date: 8 Dec 2004 11:10:21 -0000
- Subject: [Bug c++/18886] attribute sentinel doesn't work with C++
- References: <20041208104431.18886.salinger@sun.felk.cvut.cz>
- Reply-to: gcc-bugzilla at gcc dot gnu dot org
------- Additional Comments From joseph at codesourcery dot com 2004-12-08 11:10 -------
Subject: Re: New: attribute sentinel doesn't work with C++
On Wed, 8 Dec 2004, salinger at sun dot felk dot cvut dot cz wrote:
> NULL is expanded as __null in C++.
> This is inconsistent with sentinel testing.
Why do you think it is inconsistent?
When NULL is used as a variadic argument, it must be cast to the proper
pointer type. This applies in both C and C++, but especially C++ users
should expect to have to be much more careful about type-correctness and
to include appropriate casts, and C++ requires NULL to be an integer.
--
http://gcc.gnu.org/bugzilla/show_bug.cgi?id=18886