This is the mail archive of the
gcc-bugs@gcc.gnu.org
mailing list for the GCC project.
[Bug c++/81781] consexpr pointer comparsion error
- From: "redi at gcc dot gnu.org" <gcc-bugzilla at gcc dot gnu dot org>
- To: gcc-bugs at gcc dot gnu dot org
- Date: Wed, 09 Aug 2017 11:53:22 +0000
- Subject: [Bug c++/81781] consexpr pointer comparsion error
- Auto-submitted: auto-generated
- References: <bug-81781-4@http.gcc.gnu.org/bugzilla/>
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=81781
Jonathan Wakely <redi at gcc dot gnu.org> changed:
What |Removed |Added
----------------------------------------------------------------------------
Keywords| |rejects-valid
Status|UNCONFIRMED |NEW
Last reconfirmed| |2017-08-09
Ever confirmed|0 |1
--- Comment #1 from Jonathan Wakely <redi at gcc dot gnu.org> ---
Confirmed. Reduced:
template<int N> struct I { static constexpr int value = N; };
template<int N> constexpr int I<N>::value;
static constexpr bool x = &I<5>::value == &I<10>::value;
ce.cc:5:40: error: ‘((& I<5>::value) == (& I<10>::value))’ is not a constant
expression
static constexpr bool x = &I<5>::value == &I<10>::value;
~~~~~~~~~~~~~^~~~~~~~~