[Bug c++/101873] Compilation error of valid code with return local variable in C++20 mode

fchelnokov at gmail dot com gcc-bugzilla@gcc.gnu.org
Sun Aug 15 11:56:37 GMT 2021


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

--- Comment #4 from Fedor Chelnokov <fchelnokov at gmail dot com> ---
If this question is to me, then actually I am not absolutely sure. I initially
thought that GCC was right in this code example. But later a high reputy C++
expert from stackoverflow dissuaded me. According to him, the code example was
valid in C++17 and remains valid in C++20. C++ standard is so complex nowdays.


More information about the Gcc-bugs mailing list