[Bug c++/86354] Address comparison not a constant expression

mpolacek at gcc dot gnu.org gcc-bugzilla@gcc.gnu.org
Mon Jul 2 18:21:00 GMT 2018


https://gcc.gnu.org/bugzilla/show_bug.cgi?id=86354

Marek Polacek <mpolacek at gcc dot gnu.org> changed:

           What    |Removed                     |Added
----------------------------------------------------------------------------
                 CC|                            |mpolacek at gcc dot gnu.org

--- Comment #1 from Marek Polacek <mpolacek at gcc dot gnu.org> ---
The static_assert can be just
static_assert( (X*) &y != (X*) &z);

It ultimately comes down to symtab_node::equal_address_to, but due to the
extern y and z are interposable so it returns -1.


More information about the Gcc-bugs mailing list