Path: utzoo!utgpu!news-server.csri.toronto.edu!cs.utexas.edu!sun-barr!olivea!samsung!sdd.hp.com!zaphod.mps.ohio-state.edu!rpi!xor From: xor@aix01.aix.rpi.edu (Joseph Schwartz) Newsgroups: comp.std.c Subject: Pointers to Incomplete Types in Prototypes Message-ID: Date: 1 May 91 18:16:15 GMT Organization: Rensselaer Polytechnic Institute, Troy NY Lines: 24 Nntp-Posting-Host: aix01srv.aix.rpi.edu 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@mts.rpi.edu Bitnet: userez3n@rpitsmts