Path: utzoo!utgpu!news-server.csri.toronto.edu!cs.utexas.edu!usc!samsung!munnari.oz.au!cs.mu.OZ.AU!kre From: kre@cs.mu.oz.au (Robert Elz) Newsgroups: comp.std.c Subject: Re: Pointers to Incomplete Types in Prototypes Message-ID: Date: 4 May 91 05:20:40 GMT References: <700@taumet.com> <683g+p#@rpi.edu> Sender: news@cs.mu.oz.au Lines: 33 Disclaimer: I know absolutely nothing about ANSI C ... I can't see how its possible for type foo(struct bar *arg); to possibly be considered as any kind of a definition of the struct tag "bar". Whether "bar" is defined elsewhere or not, this is (and can only be) a reference to "bar". Struct tags are (should be, surely) only defined in a context as struct bar { ... }; The question of the scope inside the function prototype can only possibly be relevant to names defined there, of which "bar" is not one in the above example. It would be in type foo(struct bar { ... } *arg); which would *always* be a meaningless prototype, regardless of whether bar was defined elsewhere or not. It seems as if the compiler involved is treating the reference to bar in the first prototype above as a definition, as it hadn't seen a definition before. That is surely a bug. Would all those people who have blindly been quoting the standard on these issue please turn to the paragraph that defines struct tag definition, and please quote form there as well. kre