This is the mail archive of the
gcc@gcc.gnu.org
mailing list for the GCC project.
Re: What is the expected behavior of attribute nonnull for C++
Steven Bosscher wrote:
> That is why I was looking at this. We have http://gcc.gnu.org/PR27336,
> and part of the fix could be to make the 'this' pointer always
> non-NULL. So far I haven't found anyone who can think of a situation
> where 'this' can be NULL...
It can't be NULL. (There are ways to break your program so that it is
in fact NULL, but your program already has undefined behavior at that
point.)
--
Mark Mitchell
CodeSourcery
mark@codesourcery.com
(650) 331-3385 x713