On Wed, Apr 20, 2016 at 10:02:47PM -0700, Kyle Huey wrote:
On Wed, Apr 20, 2016 at 9:52 PM, Kris Maglione <kmagli...@mozilla.com>
There isn't a strict guarantee of non-nullness for reference parameters.
This is an extreme example, but technically valid:

 T th(*(nsresult*)0);

IIRC this is undefined behavior, so when you do this the compiler is
allowed to format your hard drive.

It is undefined behavior, and I don't expect it would ever pass review. But my other example is also technically undefined behavior, if the pointer happens to be null, but is legal otherwise, and I wouldn't be surprised to see it in real code.
_______________________________________________
dev-platform mailing list
dev-platform@lists.mozilla.org
https://lists.mozilla.org/listinfo/dev-platform

Reply via email to