Can C default to float? Are there float regs?

c20 at nmtvax.UUCP c20 at nmtvax.UUCP
Tue Sep 17 09:47:05 AEST 1985


> << first part of message here >>
>
> On a related note, it appears that register declarations for float variables 
> have no effect on our compiler (they don't cause the variables to be stored
> in registers).  It has been hypothesized that those who write the compiler
> don't feel that making "register float" do something is worth the effort.
> 
> Is there anyone who has made "register float" work?  Is it impossible?

New Mexico Tech's v7 C compiler for TOPS-20 supports register floats.
It also supports register doubles, but does so by treating a "double"
declaration as being synonymous with "float":

    "Single-precision floating point (float) and double-precision floating
     point (double) may be synonymous in some implementations."
                                                K & R, page 183, line 6

It's not impossible;  it's just more or less difficult, depending upon
what the underlying architecture provides the C compiler author in
the way of support for floating-point.

greg
-- 

Greg Titus                  ..!ucbvax!unmvax!nmtvax!c20     (uucp)
NM Tech Computer Center     ..!cmcl2!lanl!nmtvax!c20        (uucp)
Box W209 C/S                c20 at nmt                         (CSnet)
Socorro, NM 87801           c20.nmt at csnet-relay             (arpa)
(505) 835-5735
======================================================================



More information about the Comp.lang.c mailing list