Path: utzoo!utgpu!news-server.csri.toronto.edu!rpi!usc!elroy.jpl.nasa.gov!decwrl!infopiz!lupine!rfg From: rfg@NCD.COM (Ron Guilmette) Newsgroups: comp.std.c Subject: Re: Pointers to Incomplete Types in Prototypes Message-ID: <5417@lupine.NCD.COM> Date: 6 May 91 16:02:14 GMT References: <700@taumet.com> Organization: Network Computing Devices, Inc., Mt. View, CA Lines: 40 In article xor@aix01.aix.rpi.edu (Joseph Schwartz) writes: > >Now, if I understand you correctly, I should never be allowed to call >function foo, because the struct bar * that I pass to it is incompatible >with the struct bar * that it was declared to take as a parameter. >Can you please direct me to the section of the Standard that supports >this? Specifically, I want to know where it says that struct bar has >scope local only to the prototype. Ok boys and girls. I've been reading this thread about structure tags declared first (and perhaps only) in function prototypes and it seems to me that people are working under the assumption that the following two possibilities are mutually exclusive: The tag has "function prototype" scope. The function is "callable". For what it's worth, I just wanted to say that (a) I believe that those folks who are asserting that the tag has function prototype scope are correct about that, and (b) the two possibilities I've listed above are *not* completely mutually exclusive. The following example should justify my second assertion: void foo (struct s *arg); void example () { foo ((void *) 0); } I admit that I make only a minor point here. Sorry if I have digressed from the main point of the discussion. -- // Ron ("Loose Cannon") Guilmette // Internet: rfg@ncd.com uucp: ...uunet!lupine!rfg // New motto: If it ain't broke, try using a bigger hammer.