Array of functions
Norman Diamond
diamond at csl.sony.co.jp
Fri Nov 24 16:32:25 AEST 1989
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 at hpclwjm.HP.COM> walter at 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.
Incidentally, I have not yet read enough to see if arrays of functions
(function definitions) are prohibited, but for the time being will
trust it. That's why my example declares an external reference to
an array of functions (which could be defined in PL/I or assembly for
example). But in sections 3.1.2.5 and 3.5.4.2, I cannot find any sort
of prohibition against either of these.
--
Norman Diamond, Sony Corp. (diamond%ws.sony.junet at uunet.uu.net seems to work)
Should the preceding opinions be caught or | James Bond asked his
killed, the sender will disavow all knowledge | ATT rep for a source
of their activities or whereabouts. | licence to "kill".
More information about the Comp.std.c
mailing list