Re: Strange C constructs

Alex Colvin <alexc@std.com>
27 Feb 2004 22:14:50 -0500

          From comp.compilers

Related articles
Strange C constructs vbdis@aol.com (2004-02-26)
Re: Strange C constructs derek@NOSPAMknosof.co.uk (Derek M Jones) (2004-02-26)
Re: Strange C constructs iddw@hotmail.com (2004-02-27)
Re: Strange C constructs jeremy@jdyallop.freeserve.co.uk (Jeremy Yallop) (2004-02-27)
Re: Strange C constructs alexc@std.com (Alex Colvin) (2004-02-27)
Re: Strange C constructs derek@NOSPAMknosof.co.uk (Derek M Jones) (2004-03-02)
Re: Strange C constructs david.thompson1@worldnet.att.net (Dave Thompson) (2004-03-02)
Re: Strange C constructs vbdis@aol.com (2004-03-02)
Re: Strange C constructs viz@pisem.net (Victor Zverovich) (2004-03-02)
Re: Strange C constructs RLake@oxfam.org.pe (2004-03-06)
Re: Strange C constructs nmm1@cus.cam.ac.uk (2004-03-11)
| List of all articles for this month |

From: Alex Colvin <alexc@std.com>
Newsgroups: comp.compilers
Date: 27 Feb 2004 22:14:50 -0500
Organization: The World : www.TheWorld.com : Since 1989
References: 04-02-147
Keywords: C
Posted-Date: 27 Feb 2004 22:14:50 EST

>typedef int (procname)(int arg);


>According to K&R only /pointers/ to procedure-types can be constructed. Does
>there exist newer specs which allow to typedef procedures themselves?


that just means that you can't construct a (procname), only a (procname*).


void use(procname *f);


I would prefer this style for function typedefs, but I've seen it crash
at least one C compiler.


--
mac the naïf



Post a followup to this message

Return to the comp.compilers page.
Search the comp.compilers archives again.