The C11 C23 Standard requires type specifiers and forbids implicit function declarations. The C90 Standard allows implicit typing of variables and functions. Consequently, some existing legacy code uses implicit typing. Some C compilers still support legacy code by allowing implicit typing, but it should not be used for new code. Such an implementation may choose to assume an implicit declaration and continue translation to support existing programs that used this feature.
...
C no longer allows the absence of type specifiers in a declaration. The C Standard, 6.7.3 paragraph 2 [ ISO/IEC 9899:20112024 ], states
At Except where the type is inferred (6.7.10), at least one type specifier shall be given in the declaration specifiers in each declaration, and in the specifier-qualifier list in each
struct
member declaration and type name.
This noncompliant code example omits the type specifier:
...
[ISO/IEC 9899:1990] | |
[ISO/IEC 9899:20112024] | Subclause 6.7.23, "Type Specifiers" |
[Jones 2008] |
...