Previous: , Up: Variables   [Contents][Index]

20.11 Omitting Types in Declarations

The syntax of C traditionally allows omitting the data type in a declaration if it specifies a storage class, a type qualifier (see the next chapter), or auto or register. Then the type defaults to int. For example:

auto foo = 42;

This is bad practice; if you see it, fix it.