Mail Archives: djgpp/1998/04/04/01:25:51
At 02:41 4/3/1998 EST, Kbwms wrote:
>I want to create a program that handles float, double and long double
>floating-point types in their traditional 4-, 8-, and 10-byte lengths.
>
> 1. How do I do that - i.e. what compiler options do I use?
> 2. Where do I look for such information in the info system?
`float' is 4 bytes, and `double' is 8. These are the familiar 8087 (and I
think IEEE) single- and double-precision floating point types. `long double'
occupies 12 bytes; however, this is really the 10-byte extended real with 2
bytes of padding to allow for better alignment.
I am not aware of any compiler switch to disable the padding of `long
double's; I suspect you may have to hack the GCC source if those 2 bytes are
really important to you. Compiler options in general are documented in the
"Invoking" section of the GCC manual in Info.
Nate Eldredge
eldredge AT ap DOT net
- Raw text -