Path: utzoo!utgpu!news-server.csri.toronto.edu!cs.utexas.edu!sdd.hp.com!spool.mu.edu!uunet!edg1!jsa From: jsa@edg1.UUCP (J. Stephen Adamczyk) Newsgroups: comp.std.c Subject: Composite type formation question Message-ID: <948@edg1.UUCP> Date: 11 Feb 91 23:02:59 GMT Organization: Edison Design Group Inc., Upper Montclair, NJ Lines: 27 Consider this example: int f(int (*)[]); int f(a) int (*a)[3]; { return sizeof(*a); } I believe the two function types are compatible. I also believe that a composite type should be formed. 3.1.2.6 says "If only one type is a function type with a parameter type list (a function prototype), the composite type is a function prototype with the parameter type list." I believe the second type (in the function definition) does not have a "parameter type list," so the above seems to suggest that the composite should just be the type int f(int (*)[]) taking the parameter type list from the prototyped type. Is that right? If that's the case, does that mean that the sizeof is illegal? Steve Adamczyk (jsa@edg.com or uunet!edg1!jsa; 201-744-2620)