Mail Archives: djgpp/1997/02/14/04:48:02
[Please reply to me in person also]
Line 621 etseq of file DJGPP\INFO\GCC.I8 says that in djgpp C functions can
be declared inside functions, and quotes this example:-
foo (double a, double b) {
double square (double z) { return z * z; }
return square (a) + square (b); }
But I wrote this short C++ program:-
main(){int i;
int aux(int j){j=8;};
i=8;}
and djgpp v2 refused it, thus:-
C:\AMZIP>gcc _.cc
_.cc: In function `int main()':
_.cc:2: parse error before `{'
_.cc: At top level:
_.cc:3: warning: ANSI C++ forbids declaration `i' with no type or storage class
_.cc:3: parse error before `}'
C:\AMZIP>
- Raw text -