[Bug c++/103653] GCC rejected int x = 0; auto(x); in C++23
pinskia at gcc dot gnu.org
gcc-bugzilla@gcc.gnu.org
Sat Dec 25 21:58:30 GMT 2021
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=103653
--- Comment #3 from Andrew Pinski <pinskia at gcc dot gnu.org> ---
>But I think auto(x) should also be well-formed.
it is well formed as a declaration.
auto(x) = 1;
Unless something changed in that part of C++ standard too.
The following does work as expected too:
int main() {
int x = 0;
float t;
t = auto(x);
}
More information about the Gcc-bugs
mailing list