Pointers to Incomplete Types in Prototypes
Joseph Schwartz
xor at aix01.aix.rpi.edu
Thu May 2 04:16:15 AEST 1991
Must an ANSI C compiler accept pointers to incomplete types in a
function prototype?
More specifically, if struct bar has not been defined, is an ANSI
compiler allowed to reject the following prototype:
extern void foo(struct bar *);
According to 3.1.2.5, struct bar is an incomplete type in this case,
and struct bar * is a pointer to an incomplete type.
I couldn't find anything in 3.5.4.3 that allows or forbids incomplete
types, or pointers to them, in function prototypes. Can anyone give
me more conclusive information? Our HP "ANSI" C compiler is complaining
about the above prototype, and I want some ammunition before I report
it to HP as a problem.
Thanks in advance for any help you can provide.
--
Joe Schwartz
Internet: xor at mts.rpi.edu
Bitnet: userez3n at rpitsmts
More information about the Comp.std.c
mailing list