Path: utzoo!utgpu!jarvis.csri.toronto.edu!cs.utexas.edu!hellgate.utah.edu!helios.ee.lbl.gov!ucsd!ucsdhub!hp-sdd!hplabs!hpda!hpcuhb!hpcllla!hpclisp!hpclwjm!walter From: walter@hpclwjm.HP.COM (Walter Murray) Newsgroups: comp.std.c Subject: Re: Array of functions [repost] Message-ID: <12570036@hpclwjm.HP.COM> Date: 27 Nov 89 17:27:59 GMT References: <11159@riks.csl.sony.co.jp> Organization: Hewlett-Packard Calif. Language Lab Lines: 35 Norman Diamond writes: > I wrote: >>> Section 3.5.4.2 does not attempt to prohibit a declaration of the form >>> extern int f[3](); /* array of 3 functions, each returning int */ >>> What shall be the meaning of such a declaration? > In article <12570033@hpclwjm.HP.COM> walter@hpclwjm.HP.COM (Walter Murray) writes: >>Behavior is undefined because it's an erroneous program construct. >>Section 3.1.2.5 disallows arrays of functions. > OK, I have read section 3.1.2.5 three more times. Where does it > disallow arrays of functions? Page number and line number please. From the December 7, 1988, dpANS: Page 24, lines 23-24: "An array type describes a contiguously allocated nonempty set of objects with a particular member object type, called the element type." The key word is "object". A function is not an object. Page 23, lines 27-30: "Types are partitioned into object types (types that describe objects), function types (types that describe functions), and incomplete types (types that describe objects but lack information needed to determine their sizes)." Walter Murray ---