Date: Sun, 11 Mar 2018 19:56:35 -0400 From: Ian FREISLICH <ian.freislich@capeaugusta.com> To: current <current@freebsd.org> Subject: Clang-6 and GNUisms. Message-ID: <4ea06b48-d451-f2b3-4c20-4963f829333b@capeaugusta.com>
next in thread | raw e-mail | index | archive | help
Hi There's been some fallout in ports land since clang-6 around null pointer arithmetic and casts.=C2=A0 I cannot think of a good reason for doi= ng 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.=C2=A0 I know it just generates warnings, but GNUisms and -Werror abound.=C2=A0 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/typ= e-info.o../src/stub-cache.cc:1477:33: error: reinterpret_cast from 'nullptr_t' to 'char *' is not allowed =C2=A0=C2=A0=C2=A0=C2=A0=C2=A0 : GetCodeWithFlags(flags, reinterpret_cast<c= har*>(NULL)); =C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2= =A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0= =C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0 ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~ I haven't got avr-gcc to compile yet. Ian --=20 Ian Freislich --=20
Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?4ea06b48-d451-f2b3-4c20-4963f829333b>