__auto_type doesn't warn when a pointer is used as a declarator


__auto_type *p = (int *) 0;

This compiles with no problem, but GCC gives an error that we can only use plain identifier as a declarator.

Please confirm if clang behavior is valid.

Thanks in advance,
Best regards,

At the very least Clang's behaviour is consistent with "auto" in C++,
which I think is a good thing.


If someone wanted to put a patch together, it would seem reasonable to
issue a -Wgcc-compat warning on cases that we know GCC rejects. (We also
don't quite follow the GCC semantics: per GCC's documentation, an
__auto_type variable is not in scope in its own initializer, whereas
Clang's approach makes it an error to name the variable within its
initializer, like 'auto' in C++. But at least that means we reject a
superset of what GCC rejects.)