https://bugs.llvm.org/show_bug.cgi?id=35539
Bug ID: 35539
Summary: Clang does not diagnose calls to non-constexpr member
functions from constexpr member functions
Product: clang
Version: trunk
Hardware: PC
OS: Linux
Status: NEW
Severity: enhancement
Priority: P
Component: Frontend
Assignee: unassignedclangb...@nondot.org
Reporter: lebedev...@gmail.com
CC: llvm-bugs@lists.llvm.org
Not sure if this is a gcc or clang problem.
struct A {
void b(){}
constexpr void c(){b();}
};
With -std=c++14, clang trunk compiles it just fine, and gcc trunk does not:
<source>: In member function 'constexpr void A::c()':
3 : <source>:3:23: error: call to non-'constexpr' function 'void A::b()'
constexpr void c(){b();}
~^~
Compiler exited with result code 1
https://godbolt.org/g/E9cioD
--
You are receiving this mail because:
You are on the CC list for the bug.
_______________________________________________
llvm-bugs mailing list
llvm-bugs@lists.llvm.org
http://lists.llvm.org/cgi-bin/mailman/listinfo/llvm-bugs