Without this, "NULL" fails to be usable in C++11 onwards. gcc/cp/ChangeLog: * call.c (null_ptr_cst_p): Strip location wrappers when converting from '0' to a pointer type in C++11 onwards. --- gcc/cp/call.c | 2 ++ 1 file changed, 2 insertions(+)
diff --git a/gcc/cp/call.c b/gcc/cp/call.c index 6875492..e4a7f19 100644 --- a/gcc/cp/call.c +++ b/gcc/cp/call.c @@ -534,6 +534,8 @@ null_ptr_cst_p (tree t) if (cxx_dialect >= cxx11) { + STRIP_ANY_LOCATION_WRAPPER (t); + /* Core issue 903 says only literal 0 is a null pointer constant. */ if (TREE_CODE (type) == INTEGER_TYPE && !char_type_p (type) -- 1.8.5.3