Re: New C++ warning about comparing this==NULL
Re: New C++ warning about comparing this==NULL
- Subject: Re: New C++ warning about comparing this==NULL
- From: Roland King <email@hidden>
- Date: Thu, 03 Dec 2015 09:11:33 +0800
> My understanding is that the C++ spec unequivocally defines this as an error and therefor it shouldn’t be happening at all.
That’s the crux of Jens’ question. Which version of the C++ spec actually includes wording which makes this undefined behaviour? There’s drafts and proposals for language which would unarguably make it so, but I haven’t yet found a version of the specification which currently includes that language. There’s evidence that members of the C++ working group feel it ought to be undefined, despite having answered the exact question about its legality in 2001 saying that yes it’s legal, but it’s not clear they’ve acted on it.
All hair-splitting in the end. If the compiler you’re using considers it undefined behaviour then you don’t have a lot of options but to stop using it if you want to avoid undefined results.
_______________________________________________
Do not post admin requests to the list. They will be ignored.
Xcode-users mailing list (email@hidden)
Help/Unsubscribe/Update your Subscription:
This email sent to email@hidden