Related articles |
---|
[8 earlier articles] |
Re: Parallelizing (WAS: Death by pointers.) wclodius@lanl.gov (1995-10-28) |
Re: Parallelizing (WAS: Death by pointers.) cliffc@ami.sps.mot.com (1995-11-03) |
Re: Parallelizing (WAS: Death by pointers.) chase@centerline.com (1995-11-06) |
Re: Parallelizing (WAS: Death by pointers.) chase@centerline.com (1995-11-06) |
Re: Parallelizing (WAS: Death by pointers.) hbaker@netcom.com (1995-11-10) |
Re: Parallelizing (WAS: Death by pointers.) dave@occl-cam.demon.co.uk (Dave Lloyd) (1995-11-13) |
Re: Parallelizing (WAS: Death by pointers.) davids@ICSI.Berkeley.EDU (1995-11-14) |
Re: Parallelizing (WAS: Death by pointers.) cliffc@ami.sps.mot.com (1995-11-14) |
Re: Parallelizing (WAS: Death by pointers.) chase@centerline.com (1995-11-19) |
Re: Parallelizing (WAS: Death by pointers.) mikey@banzai.ontek.com (1995-11-20) |
Newsgroups: | comp.compilers |
From: | davids@ICSI.Berkeley.EDU (David Petrie Stoutamire) |
Keywords: | C, translator |
Organization: | International Computer Science Institute, Berkeley, CA, U.S.A. |
References: | 95-11-015 95-11-060 |
Date: | Tue, 14 Nov 1995 00:48:46 GMT |
David Chase <chase@centerline.com> wrote:
>My experience. years ago, working with C as an intermediate language,
>is that the major thing to watch out for is any feature of C more
>complicated than a floating point number. Structures are ok for
>internal data structures, but you have to be very careful if think
>you can use one for (for instance) a representation of a data
>structure from the source (non-C) language. ...
While I agree with your other comments regarding C vs. C++ as an
intermediate language, I don't understand the above. In the Sather->C
compiler I used structs for most anything it made sense for, and they
worked beautifully; the generated code is easy to read, portable, and a
C debugger does a reasonable job of pulling apart data structures,
given the name mangling. What is it about structures that you think
poses a problem? The worst thing I encountered was having to emit
nested structures in topological order.
This is especially baffling, since the first Sather compiler used
traditional field-offset pointer arithmetic instead of C structures and
I found this style of code generation far easier to handle. If I had
to pick a feature of C that was a major problem, I would pick floating
point portability problems. (Sather strives for IEEE but it's damn
hard to get rounding, exceptions, and proper underflow portably.)
- Dave
--
Return to the
comp.compilers page.
Search the
comp.compilers archives again.