-
Bug
-
Resolution: Unresolved
-
Medium
-
Code Generation Tools
-
CODEGEN-4158
-
TI compiler does not emit clang error for: constexpr function never produces a constant expression
Some examples:
Clang and GCC emit errors:
test.cpp:10:17: error: constexpr function never produces a constant expression [-Winvalid-constexpr]
constexpr char* f(const char* p) {
^
For this test case:
constexpr char* f(const char* p)
Clang emits below error:
test.cpp:10:16: error: constexpr function never produces a constant expression [-Winvalid-constexpr]
constexpr bool f(void) {
For this test case:
#include <exception>
constexpr bool f(void)