https://gcc.gnu.org/bugzilla/show_bug.cgi?id=80886
Jonathan Wakely <redi at gcc dot gnu.org> changed:
What |Removed |Added
----------------------------------------------------------------------------
Known to work| |6.4.0
Version|unknown |7.3.1
Known to fail| |7.3.0, 8.0.1
--- Comment #1 from Jonathan Wakely <redi at gcc dot gnu.org> ---
I can't reproduce this with GCC 6, but can with GCC 7:
un.cc:3:55: error: value '4096' of type 'void*' is not a constant expression
constexpr void *phardware {CONST ((void *) 0x1000)};
^
and with trunk:
un.cc:3:39: error: reinterpret_cast from integer to pointer
constexpr void *phardware {CONST ((void *) 0x1000)};
^~~~~~~~~~~~~~~
un.cc:1:45: note: in definition of macro 'CONST'
#define CONST(x) (__builtin_constant_p(x) ? x : x)
^