Xref: utzoo comp.lang.c:38081 news.software.b:7419 Newsgroups: comp.lang.c,news.software.b Path: utzoo!henry From: henry@zoo.toronto.edu (Henry Spencer) Subject: Re: Redeclaration of Variables extern/static Message-ID: <1991Apr9.172536.13657@zoo.toronto.edu> Date: Tue, 9 Apr 1991 17:25:36 GMT References: <^R+_H3-@uzi-9mm.fulcrum.bt.co.uk> <1243@airs.UUCP> <1991Apr9.055250.24257@world.std.com> Organization: U of Toronto Zoology In article <1991Apr9.055250.24257@world.std.com> geoff@world.std.com (Geoff Collyer) writes: >Henry's opinion (I hope I'm not misquoting him) is that there are certain >cases that ANSI doesn't cover either (forward static arrays, as I recall). Forward static arrays of unspecified size are the problem. For those, there simply is no portable way to write a forward declaration, and we're simply going to have to avoid doing this. For everything else, the problem is not unsolvable, merely awkward. Old compilers won't take static forward declarations at all, while new ones won't take extern forward declarations for static objects. The choice is between avoiding forward declarations entirely, using a macro so you can make them extern or static as required, or just giving up and making the objects extern. These are all somewhat distasteful. While we do intend to be ANSI compatible, our development systems have historically used old compilers, and it will be quite a while before the last lingering glitches get sorted out. -- "The stories one hears about putting up | Henry Spencer @ U of Toronto Zoology SunOS 4.1.1 are all true." -D. Harrison| henry@zoo.toronto.edu utzoo!henry