Ian FREISLICH
2018-03-11 23:56:35 UTC
Hi
There's been some fallout in ports land since clang-6 around null
pointer arithmetic and casts. I cannot think of a good reason for doing
the following but then I've not dabbled in the arcane much:
# define __INT_TO_PTR(P) ((P) + (char *) 0)
So far I've encountered these in lang/v8 and devel/avr-gcc. I know it
just generates warnings, but GNUisms and -Werror abound. Adding
-Wno-null-pointer-arithmetic and -Wno-vexing-parse to CFLAGS/CXXFLAGS
provides some relief but V8 still fails:
/usr/ports/lang/v8/work/v8-3.18.5/out/native/obj.target/v8_base.x64/src/type-info.o../src/stub-cache.cc:1477:33:
error: reinterpret_cast from 'nullptr_t' to 'char *' is not allowed
: GetCodeWithFlags(flags, reinterpret_cast<char*>(NULL));
^~~~~~~~~~~~~~~~~~~~~~~~~~~~~
I haven't got avr-gcc to compile yet.
Ian
There's been some fallout in ports land since clang-6 around null
pointer arithmetic and casts. I cannot think of a good reason for doing
the following but then I've not dabbled in the arcane much:
# define __INT_TO_PTR(P) ((P) + (char *) 0)
So far I've encountered these in lang/v8 and devel/avr-gcc. I know it
just generates warnings, but GNUisms and -Werror abound. Adding
-Wno-null-pointer-arithmetic and -Wno-vexing-parse to CFLAGS/CXXFLAGS
provides some relief but V8 still fails:
/usr/ports/lang/v8/work/v8-3.18.5/out/native/obj.target/v8_base.x64/src/type-info.o../src/stub-cache.cc:1477:33:
error: reinterpret_cast from 'nullptr_t' to 'char *' is not allowed
: GetCodeWithFlags(flags, reinterpret_cast<char*>(NULL));
^~~~~~~~~~~~~~~~~~~~~~~~~~~~~
I haven't got avr-gcc to compile yet.
Ian
--
Ian Freislich
--
Ian Freislich
--