Clang-6 and GNUisms.

From: Ian FREISLICH <>
Date: Sun, 11 Mar 2018 19:56:35 -0400

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:

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 Freislich

Received on Sun Mar 11 2018 - 22:56:39 UTC

This archive was generated by hypermail 2.4.0 : Wed May 19 2021 - 11:41:15 UTC