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++/67592] New: A virtual member function declared constexpr fails to trigger a diagnostic


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

            Bug ID: 67592
           Summary: A virtual member function declared constexpr fails to
                    trigger a diagnostic
           Product: gcc
           Version: 6.0
            Status: UNCONFIRMED
          Severity: normal
          Priority: P3
         Component: c++
          Assignee: unassigned at gcc dot gnu.org
          Reporter: andrey.vul at gmail dot com
  Target Milestone: ---

The test case

// begin test.cc
struct S {
        constexpr virtual int f() { return 1; }
};
// end test.cc

fails to emit a diagnostic with invocation

g++-6.0.0-alpha20150830 -std=c++11 -Wall -Wextra -pedantic test.cc

C++11 and C++14 [dcl.constexpr]p3.1 state that a constexpr function shall not
be virtual.


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