Re: Pcc, generic compilation (James Jones)
2 Apr 1996 23:43:44 -0500

          From comp.compilers

Related articles
Pcc, generic compilation (1996-03-31)
Re: Pcc, generic compilation (1996-04-02)
Re: Pcc, generic compilation (Dave Lloyd) (1996-04-06)
Re: Pcc, generic compilation (Jaap van Ganswijk) (1996-04-06)
| List of all articles for this month |

From: (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 (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 */
case offsetof(struct arf, x):
/* blah 2 */

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.