Article View: comp.std.c
Article #2856Re: Pointers to Incomplete Types in Prototypes
From: Ron Guilmette
Date: Mon, 06 May 1991 16:02
Date: Mon, 06 May 1991 16:02
40 lines
1910 bytes
1910 bytes
In article <cl3gg!n@rpi.edu> 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.
Technical Details
Message-ID:
<5417@lupine.NCD.COM>Path:
arc1-ca.pugleaf.net!utzoo!utgpu!news-server.csri.toronto.edu!rpi!usc!elroy.jpl.nasa.gov!decwrl!infopiz!lupine!rfgReferences:
<w!2g7+c@rpi.edu> <700@taumet.com> <cl3gg!n@rpi.edu>Show Full Headers
Complete Article Headers
Path: arc1-ca.pugleaf.net!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: <w!2g7+c@rpi.edu> <700@taumet.com> <cl3gg!n@rpi.edu> Organization: Network Computing Devices, Inc., Mt. View, CA Lines: 40