static a not of type int in a C++ programm?
Peter Schmid
schmid@ltoi.iap.physik.tu-darmstadt.de
Wed Dec 10 07:23:00 GMT 1997
int main()
{
static a;
a++;
unsigned b;
b++;
}
g++ -o t t.C
t.C: In function `int main()':
t.C:3: warning: ANSI C++ forbids declaration `a' with no type
If this is the new behaviour due to a change in the standard I suggest making
this an error instead of emitting a warning.
But I am not shure if this the correct behaviour.
It compiles as a C programm without warnings.
Peter Schmid
More information about the Gcc-bugs
mailing list