[Bug c++/18886] attribute sentinel doesn't work with C++
joseph at codesourcery dot com
gcc-bugzilla@gcc.gnu.org
Wed Dec 8 11:10:00 GMT 2004
------- 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
More information about the Gcc-bugs
mailing list