Pointers to Incomplete Types in Prototypes

Ron Guilmette rfg at NCD.COM
Tue May 7 02:02:14 AEST 1991


In article <cl3gg!n at rpi.edu> xor at 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 at ncd.com      uucp: ...uunet!lupine!rfg
// New motto:  If it ain't broke, try using a bigger hammer.



More information about the Comp.std.c mailing list