Jens Alfke (2/12/15, 19:22) said:
>In Xcode 7 some C++ code of mine has started being flagged with a new warning:
>
>Value.cc:45:13: error: 'this' pointer cannot be null in well-defined C++
>code; comparison may be assumed to always evaluate to false [-Werror,-
>Wtautological-undefined-compare]
> if (this == NULL) return kNull;
> ^~~~ ~~~~
If you want to remove the warning, you could assign 'this' to another pointer
and test that:
void *p = this;
if (p == NULL)
return kNull;
Jeremy
_______________________________________________
Do not post admin requests to the list. They will be ignored.
Xcode-users mailing list ([email protected])
Help/Unsubscribe/Update your Subscription:
https://lists.apple.com/mailman/options/xcode-users/archive%40mail-archive.com
This email sent to [email protected]