This is the mail archive of the
gcc-bugs@gcc.gnu.org
mailing list for the GCC project.
[Bug c++/67380] New: constexpr: Comparison of pointers to member array
- From: "columbo at gmx-topmail dot de" <gcc-bugzilla at gcc dot gnu dot org>
- To: gcc-bugs at gcc dot gnu dot org
- Date: Fri, 28 Aug 2015 09:04:09 +0000
- Subject: [Bug c++/67380] New: constexpr: Comparison of pointers to member array
- Auto-submitted: auto-generated
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=67380
Bug ID: 67380
Summary: constexpr: Comparison of pointers to member array
Product: gcc
Version: 6.0
Status: UNCONFIRMED
Severity: normal
Priority: P3
Component: c++
Assignee: unassigned at gcc dot gnu.org
Reporter: columbo@gmx-topmail.de
Target Milestone: ---
struct A {int arr[3] {1, 2, 3};} constexpr a{};
static_assert( a.arr != a.arr+3 );
This fails with 20150813, while it shouldn't. [expr.const]/(2.19) states that
the result shall be specified for an application of an equality operator to be
a constant subexpression; And [expr.eq]/2 clearly makes this specified, such
that the assertion shouldn't fire.