https://bugs.llvm.org/show_bug.cgi?id=50578
Bug ID: 50578
Summary: Integral promotion on incomplete enum types
Product: clang
Version: unspecified
Hardware: All
OS: All
Status: NEW
Severity: normal
Priority: P
Component: C++
Assignee: [email protected]
Reporter: [email protected]
CC: [email protected], [email protected],
[email protected], [email protected],
[email protected]
int f(int);
template<class E>
E&& g();
enum E {
e = decltype(f(g<E>()))(42),
};
This is rejected by clang 9 and accepted since 10.
Initialization of the parameter of f involves an lvalue-to-rvalue conversion on
g<E>() followed by an integral promotion. The former should be ill-formed by
[conv.lval]p1:
A glvalue of a non-function, non-array type T can be converted to a prvalue. If
T is an incomplete type, a program that necessitates this conversion is
ill-formed.
--
You are receiving this mail because:
You are on the CC list for the bug._______________________________________________
llvm-bugs mailing list
[email protected]
https://lists.llvm.org/cgi-bin/mailman/listinfo/llvm-bugs