Re: Pros and cons of high-level intermediate languages

jfc@athena.mit.edu (John F Carr)
Sat, 25 Jul 1992 15:06:25 GMT

          From comp.compilers

Related articles
[9 earlier articles]
Re: Pros and cons of high-level intermediate languages tarvydas@tsctrl.guild.org (1992-07-23)
Re: Pros and cons of high-level intermediate languages graham@maths.su.oz.au (1992-07-24)
Re: Pros and cons of high-level intermediate languages acha@CS.CMU.EDU (1992-07-24)
Re: Pros and cons of high-level intermediate languages graham@maths.su.oz.au (1992-07-25)
Re: Pros and cons of high-level intermediate languages fjh@munta.cs.mu.OZ.AU (1992-07-25)
Re: Pros and cons of high-level intermediate languages moss@cs.umass.edu (1992-07-25)
Re: Pros and cons of high-level intermediate languages jfc@athena.mit.edu (1992-07-25)
Re: Pros and cons of high-level intermediate languages scott@bbx.basis.com (1992-07-25)
Re: Pros and cons of high-level intermediate languages sewardj@cs.man.ac.uk (1992-07-26)
Re: Pros and cons of high-level intermediate languages ridoux@irisa.fr (1992-07-27)
Re: Pros and cons of high-level intermediate languages gat@forsight.jpl.nasa.gov (1992-07-29)
Re: Pros and cons of high-level intermediate languages moss@cs.umass.edu (1992-07-30)
Re: Pros and cons of high-level intermediate languages boehm@parc.xerox.com (1992-07-30)
[12 later articles]
| List of all articles for this month |
Newsgroups: comp.compilers
From: jfc@athena.mit.edu (John F Carr)
Organization: Massachusetts Institute of Technology
Date: Sat, 25 Jul 1992 15:06:25 GMT
References: 92-07-068 92-07-084
Keywords: C, translator

graham@maths.su.oz.au (Graham Matthews) writes:


>I think you will find that gcc 2.X allows you to have arrays of labels.
>Any gcc experts out there to confirm this?


In gcc you can take the address of a label:


foo:
...
void *labelp = &&foo;


There is a design flaw in this language extension: labels are represented
as (void *) rather than having a distinct type. Until very recently, the
FSF only cared about traditional 32 bit single address space processors*.
On such machines, when label pointers are implemented as pointers to an
instruction, label pointers are the same size as data pointers.




* From the GNU coding standards document: "You can assume that all
pointers have the same format, regardless of the type they point to, and
that this is really an integer. There are some weird machines where this
isn't true, but they aren't important; don't waste time catering to them."


--
        John Carr (jfc@athena.mit.edu)
--


Post a followup to this message

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