On Thursday 2012-07-26 00:55 -0700, Aryeh Gregor wrote:
> I guess we could define it to be NULL instead of 0L/0LL, but surely there was 
> some reason we didn't do that for nsnull to begin with?

There are some header files in various libraries or OSes that define
NULL for C++ as ((void*)0) rather than just 0 or 0L/0LL.  While
((void*)0) is the traditional defintion in C, for C++ it's broken
since you can't cast a (void*) to a function pointer.

(For example, on my Ubuntu 11.10 system, this is broken in only
/usr/include/valgrind/pub_tool_basics.h and
/usr/include/gstreamer-0.10/gst/check/internal-check.h, but I
believe the problem used to be more common and may have been present
in the standard library on some more obscure systems.)

-David

-- 
𝄞   L. David Baron                         http://dbaron.org/   𝄂
𝄢   Mozilla                           http://www.mozilla.org/   𝄂
_______________________________________________
dev-platform mailing list
dev-platform@lists.mozilla.org
https://lists.mozilla.org/listinfo/dev-platform

Reply via email to