Path: utzoo!utgpu!news-server.csri.toronto.edu!mailrus!wuarchive!cs.utexas.edu!samsung!brutus.cs.uiuc.edu!jarthur!uci-ics!nagel From: nagel@ics.uci.edu (Mark Nagel) Newsgroups: comp.std.c Subject: Re: "[][]" revisited Message-ID: <26098296.2590@paris.ics.uci.edu> Date: 23 Mar 90 01:57:43 GMT References: <26097D45.1861@paris.ics.uci.edu> Lines: 21 rfg@paris.ics.uci.edu (Ronald Guilmette) writes: >Lots of people have sent me messages containing their opinions regarding >the legality or illegality of declarations like: >int (*foo)[][]; >But none of these folks has yet produced the smoking gun, i.e. nobody >has cited any passage from the ANSI standard that *either* says that >this is illegal or that it is illegal. While not _the_ ANSI standard, take a look at K&R II, pp. 216-217. An array declaration without a size specification is an incomplete type. An array may only be constructed from a complete type. If you think about how arrays are layed out in memory, you'll understand why this must be true. -- Mark Nagel UC Irvine Department of ICS +----------------------------------------+ ARPA: nagel@ics.uci.edu | Six plus six equals fourteen for large | UUCP: ucbvax!ucivax!nagel | values of six -- Dave Ackerman |