Closed Eczbek closed 2 hours ago
https://godbolt.org/z/j58z8175s
#include <print> consteval const int* foo() { static constexpr int x = 5; return &x; } int main() { std::print("{}", *foo()); }
GCC prints 5 as expected, but Clang prints 0.
5
0
@llvm/issue-subscribers-clang-frontend
Author: None (Eczbek)
Perhaps a duplicate of https://github.com/llvm/llvm-project/issues/82994 .
Perhaps a duplicate of #82994 .
Looks like it.
https://godbolt.org/z/j58z8175s
GCC prints
5
as expected, but Clang prints0
.