[comp.lang.c] Warping of C

daveb@geac.UUCP (Brown) (08/19/87)

In article <2163@xanth.UUCP> kent@xanth.UUCP (Kent Paul Dolan) writes:
>Is it just me, or has anyone else noticed how C is being warped, made
>ugly and complex, because ONE microprocessor manufacturer couldn't see
>fit to provide a flat, linear address space?  ...  If someone _has_ to 
>use those bizzare devices, let him invent a compiler that reads "virtual
> machine C" ...
>I don't think it is a useful endeavor to labor at such length to embed
>the hardware design mistakes of the past in the C standards of the
>future.

  I don't necessarily believe that C itself is being warped, but the
compilers I see for the 80X86 machines do go through some wonderful
fits of arm-waving to get decent code generated.  
  C is supposed to be able to run on some *peculiar* machines (32-bit
int pointers, 48-bit char pointers), and the problems are non-trivial.
Especially when you want to generate _good_ code for one of these.
So the compiler authors try to solve them ("far" pointers) or put
solutions up for the standards bodys to consider ("volatile" addresses)
and us people on rather-vanilla machines end up trying to find out
what **strange** assumptions have been built into programs.

  My variant of the solution is segmentation-error detecting loaders,
with a "#pragma groupwith var other_var" directive in the compiler to
allow me to annotate a working program so that it will port to a
machine where you have to lay out the data areas _by_hand_.

 --dave (I hate 80X86's: I used to work with them) collier-brown

-- 
 David Collier-Brown.                 {mnetor|yetti|utgpu}!geac!daveb
 Geac Computers International Inc.,   |  Computer Science loses its
 350 Steelcase Road,Markham, Ontario, |  memory (if not its mind)
 CANADA, L3R 1B3 (416) 475-0525 x3279 |  every 6 months.