home *** CD-ROM | disk | FTP | other *** search
- Newsgroups: comp.compilers
- Path: sparky!uunet!gatech!news.byu.edu!eff!world!iecc!compilers-sender
- From: jfc@athena.mit.edu (John F Carr)
- Subject: Re: Pros and cons of high-level intermediate languages
- Reply-To: jfc@athena.mit.edu (John F Carr)
- Organization: Massachusetts Institute of Technology
- Date: Sat, 25 Jul 1992 15:06:25 GMT
- Approved: compilers@iecc.cambridge.ma.us
- Message-ID: <92-07-092@comp.compilers>
- References: <92-07-068@comp.compilers> <92-07-084@comp.compilers>
- Keywords: C, translator
- Sender: compilers-sender@iecc.cambridge.ma.us
- Lines: 28
-
- 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)
- --
- Send compilers articles to compilers@iecc.cambridge.ma.us or
- {ima | spdcc | world}!iecc!compilers. Meta-mail to compilers-request.
-