3 ms·
> PS: at least Clang has a warning now in pedantic mode: https://www.godbolt.org/z/ovj5r4axn https://www.godbolt.org/z/ovj5r4axn Did you mean gcc? Your link sh
by cpeterso 2y ago
> PS: at least Clang has a warning now in pedantic mode: https://www.godbolt.org/z/ovj5r4axn https://www.godbolt.org/z/ovj5r4axn
Did you mean gcc? Your link shows a gcc error:
<source>:3:5: error: 'auto' requires a plain identifier, possibly with attributes, as declarator
3 | auto* p = &i;
| ^~~~
- flohofwoe 2y agoNo, GCC is right to error there, because the code uses a C++-ism (the '*' after 'auto' only makes sense in C++ but not in C).