🚀 go-pugleaf

RetroBBS NetNews Server

Inspired by RockSolid Light RIP Retro Guy

Article View: gnu.gcc.help
Article #51153

Problems with pointers to function pointers

#51153
From: Jarkko Sonninen
Date: Tue, 06 Jul 1993 16:44
16 lines
1061 bytes
Could someone explain, why the following piece of code compiles ok
as c (gcc 2.4.3), but not as c++ (g++), please ?

void b (void) { return; }

void a (void (**ptr)(void)) {
    *ptr = b;
}

main () {
    void (*p)(void);
    a (&p);
    p ();
}
--
  Jarkko.Sonninen@lut.fi
Technical Details
Message-ID: <JARKKO.SONNINEN.93Jul6114444@hilja.it.lut.fi>
Path: arc1-ca.pugleaf.net!gmd.de!xlink.net!sol.ctr.columbia.edu!howland.reston.ans.net!noc.near.net!uunet!mcsun!news.eunet.fi!funic!news.lut.fi!lut.fi!Jarkko.Sonninen

Show Full Headers
Complete Article Headers
X-Google-Language: ENGLISH,ASCII-7-bit
X-Google-Thread: 11318c,916187eb199f73e8,start
X-Google-Attributes: gid11318c,public
X-Google-ArrivalTime: 1993-07-06 03:17:18 PST
Newsgroups: gnu.gcc.help
Path: arc1-ca.pugleaf.net!gmd.de!xlink.net!sol.ctr.columbia.edu!howland.reston.ans.net!noc.near.net!uunet!mcsun!news.eunet.fi!funic!news.lut.fi!lut.fi!Jarkko.Sonninen
From: Jarkko.Sonninen@lut.fi (Jarkko Sonninen)
Subject: Problems with pointers to function pointers
Sender: news@lut.fi (Usenet News)
Message-ID: <JARKKO.SONNINEN.93Jul6114444@hilja.it.lut.fi>
Date: Tue, 6 Jul 1993 16:44:44 GMT
Distribution: gnu
Disclaimer: Misuse of the following opinions is forbidden.
Nntp-Posting-Host: hilja.it.lut.fi
Organization: Lappeenranta University of Technology, Finland
Lines: 16