Consider this code (t0.c):
typedef int T;
void f(int T);
Invocations:
gcc -std=c11 -Wall -Wextra -pedantic -c t0.c
<nothing>
clang -std=c11 -Wall -Wextra -pedantic -c t0.c
<nothing>
cl /std:c11 /Za /c t0.c
t0.c(2): warning C4224: nonstandard extension used: formal parameter 'T' was previously defined as a type
Questions:
- Which C rules allow to use in function declarator an identifier, which was previously defined as a type?
- If msvc says
nonstandard extension, then why standard conforming gcc / clang does not say anything?