We are nesting functions now?
Timothy J. Wood
tjw@omnigroup.com
Wed Dec 11 22:19:00 GMT 2002
If you move the call to f3 so that it is in the proper scope, this
works:
% cc -Wall foo.c -o foo
% ./foo
F1
F3
F2
% cc -v
cc -v
Reading specs from /usr/libexec/gcc/darwin/ppc/3.1/specs
Thread model: posix
Apple Computer, Inc. GCC version 1173, based on gcc version 3.1
20020420 (prerelease)
#include <stdio.h>
int main() {
void fi() {
void f2() {
printf("F2\n");
}
void f3() {
printf("F3\n");
f2();
}
printf("F1\n");
f3();
}
fi();
return 1;
}
-tim
More information about the Gcc
mailing list