Re: Pcc, generic compilation

jejones@microware.com (James Jones)
2 Apr 1996 23:43:44 -0500

          From comp.compilers

Related articles
Pcc, generic compilation gclind01@starbase.spd.louisville.edu (1996-03-31)
Re: Pcc, generic compilation jejones@microware.com (1996-04-02)
Re: Pcc, generic compilation dave@occl-cam.demon.co.uk (Dave Lloyd) (1996-04-06)
Re: Pcc, generic compilation ganswijk@xs4all.nl (Jaap van Ganswijk) (1996-04-06)
| List of all articles for this month |
From: jejones@microware.com (James Jones)
Newsgroups: comp.compilers
Date: 2 Apr 1996 23:43:44 -0500
Organization: Microware Systems Corp., Des Moines, Iowa
References: 96-03-217
Keywords: design

gclind01@starbase.spd.louisville.edu (George C. Lindauer) writes:
>...E.G. instead of having the main
>compiler resolve numerical offsets, just have it pass the structure
>names and fields and elementary types and then have the backend
>resolve the offsets with any alignment or other concerns?


That would be nice--but as the moderator says, there are some things
more easily handled in the front end. Case in point for C: sizeof()
and offsetof() have to yield constants/constant expressions, so it's
theoretically possible (bizarre, but theoretically possible) to write
something like


switch (i) {
case offsetof(struct woof, x):
/* blah */
break;
case offsetof(struct arf, x):
/* blah 2 */
break;
}


and it would be a major pain to make the back end give a reasonable error
message if, say, the values were identical!


James Jones
--


Post a followup to this message

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