🚀 go-pugleaf

RetroBBS NetNews Server

Inspired by RockSolid Light RIP Retro Guy

Article View: comp.std.c
Article #1003

Re: Array of functions

#1003
From: Norman Diamond
Date: Fri, 24 Nov 1989 05:32
26 lines
1754 bytes
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.

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@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".
Technical Details
Message-ID: <11184@riks.csl.sony.co.jp>
Path: arc1-ca.pugleaf.net!utzoo!mnetor!tmsoft!torsqnt!jarvis.csri.toronto.edu!rutgers!usc!samsung!uunet!kddlab!titcca!sragwa!wsgw!socslgw!diamond
References: <11145@riks.csl.sony.co.jp> <12570033@hpclwjm.HP.COM>

Show Full Headers
Complete Article Headers
Path: arc1-ca.pugleaf.net!utzoo!mnetor!tmsoft!torsqnt!jarvis.csri.toronto.edu!rutgers!usc!samsung!uunet!kddlab!titcca!sragwa!wsgw!socslgw!diamond
From: diamond@csl.sony.co.jp (Norman Diamond)
Newsgroups: comp.std.c
Subject: Re: Array of functions
Message-ID: <11184@riks.csl.sony.co.jp>
Date: 24 Nov 89 05:32:25 GMT
References: <11145@riks.csl.sony.co.jp> <12570033@hpclwjm.HP.COM>
Reply-To: diamond@ws.sony.junet (Norman Diamond)
Organization: Sony Computer Science Laboratory Inc., Tokyo, Japan
Lines: 26