Understanding Packages

Henry Spencer henry-lqW1N6Cllo0sV2N9l4h3zg at public.gmane.org
Tue Apr 20 15:40:35 UTC 2004


On Tue, 20 Apr 2004, Lennart Sorensen wrote:
> int main() {
> 	int a,b;
> 	void callMe(int x) {
> 		printf("callMe called with %d\n",x);
> 	}
> ...
> }
> 
> No nesting in C?  Really?

Really.  You're making the common "all the world uses my compiler"
mistake.  Don't confuse the language accepted by GCC with C as defined by
the standards -- GCC implements a number of non-standard extensions, this
being one of them.  Nested function definitions have never been part of
the C language, and very few other compilers will accept them. 

                                                          Henry Spencer
                                                       henry-lqW1N6Cllo0sV2N9l4h3zg at public.gmane.org

--
The Toronto Linux Users Group.      Meetings: http://tlug.ss.org
TLUG requests: Linux topics, No HTML, wrap text below 80 columns
How to UNSUBSCRIBE: http://tlug.ss.org/subscribe.shtml





More information about the Legacy mailing list