Sun Studio 12: C User's Guide

D.1.7 Declarations Using Implicit int

6.7.2 Type specifiers:

At least one type specifier shall be given in the declaration specifiers in each declaration. See also D.1.6 Disallowed Implicit int and Implicit Function Declarations.

The C compiler now issues warnings on any implicit int declaration as in the following example:


example% more test.c
volatile i;
const foo()
{
  return i;
}
example% cc test.c
  "test.c", line 1: warning: no explicit type given
  "test.c", line 3: warning: no explicit type given
example%