Re: Help needed with function pointer examples

Tony Finch <dot@dotat.at>
19 Jan 2012 14:07:53 +0000 (GMT)

          From comp.compilers

Related articles
Help needed with function pointer examples swatirathi@cse.iitb.ac.in (Swati) (2012-01-06)
Re: Help needed with function pointer examples ulimakesacompiler@googlemail.com (Uli Kusterer) (2012-01-15)
Re: Help needed with function pointer examples gah@ugcs.caltech.edu (glen herrmannsfeldt) (2012-01-15)
Re: Help needed with function pointer examples torbenm@diku.dk (2012-01-16)
Re: Help needed with function pointer examples arnold@skeeve.com (2012-01-16)
Re: Help needed with function pointer examples DrDiettrich1@aol.com (Hans-Peter Diettrich) (2012-01-17)
Re: Help needed with function pointer examples dot@dotat.at (Tony Finch) (2012-01-19)
| List of all articles for this month |

From: Tony Finch <dot@dotat.at>
Newsgroups: comp.compilers
Date: 19 Jan 2012 14:07:53 +0000 (GMT)
Organization: dotat labs
References: 12-01-006
Keywords: analysis, code
Posted-Date: 19 Jan 2012 09:27:57 EST

Swati <swatirathi@cse.iitb.ac.in> wrote:
>
>We are doing an analysis on the usage of function pointers.
>We have considered one such example as GCC which uses function pointers.
>Can you suggest any other application which uses function pointers
>extensively.


Function pointers are often a nice way to implement state machines,
for instance http://dotat.at/cgi/git?p=unifdef.git;a=blob;f=unifdef.c


The byte code in a threaded code interpreter is often just a list of
function pointers.


There are a lot of function pointers in the unix kernel. Have a look
at Lions' commentary, Stevens' TCP/IP Illustrated volume 2, and
McKusick & Neville-Neil's Design and Implementation of the FreeBSD
operating system.


Tony.
--
f.anthony.n.finch <dot@dotat.at> http://dotat.at/


Post a followup to this message

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