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

2022-01-06 Thread ppalka at gcc dot gnu.org via Gcc-bugs
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=86354

Patrick Palka  changed:

   What|Removed |Added

 Resolution|--- |DUPLICATE
 Status|NEW |RESOLVED
 CC||ppalka at gcc dot gnu.org

--- Comment #2 from Patrick Palka  ---
This seems to be fixed for GCC 12 by the fix for PR94716.

*** This bug has been marked as a duplicate of bug 94716 ***

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

2018-07-02 Thread mpolacek at gcc dot gnu.org
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=86354

Marek Polacek  changed:

   What|Removed |Added

 CC||mpolacek at gcc dot gnu.org

--- Comment #1 from Marek Polacek  ---
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.

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

2018-06-28 Thread redi at gcc dot gnu.org
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=86354

Jonathan Wakely  changed:

   What|Removed |Added

   Keywords||rejects-valid
 Status|UNCONFIRMED |NEW
   Last reconfirmed||2018-06-29
Version|8.0 |8.1.0
 Ever confirmed|0   |1