This is the mail archive of the gcc-bugs@gcc.gnu.org mailing list for the GCC project.


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]
Other format: [Raw text]

[Bug c++/67380] New: constexpr: Comparison of pointers to member array


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.


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]