Relay-Version: version B 2.10 5/3/83; site utzoo.UUCP Posting-Version: version B 2.10.2 9/18/84; site harvard.ARPA Path: utzoo!linus!philabs!cmcl2!seismo!harvard!draves From: draves@harvard.ARPA (Richard Draves) Newsgroups: net.lang.c Subject: typedef's & cc Message-ID: <145@harvard.ARPA> Date: Sun, 11-Nov-84 23:12:37 EST Article-I.D.: harvard.145 Posted: Sun Nov 11 23:12:37 1984 Date-Received: Tue, 13-Nov-84 01:27:32 EST Distribution: net Organization: Aiken Computation Laboratory, Harvard Lines: 22 Don't the normal scope rules hold for typedef? The following program produced errors under 4.2BSD: typedef int foo; main() { auto int foo; foo = 2; } "test.c", line 5: illegal type combination "test.c", line 7: syntax error "test.c", line 7: warning: illegal combination of pointer and integer, op = "test.c", line 7: unknown size "test.c", line 7: cannot recover from earlier errors: goodbye! Stylistic considerations aside, why isn't foo a variable inside main, and a type outside? And why can't cc recover from such simple errors? Rich