cvs.gedasymbols.org/archives/browse.cgi   search  
Mail Archives: djgpp/1998/04/04/01:25:51

Date: Fri, 3 Apr 1998 22:25:06 -0800 (PST)
Message-Id: <199804040625.WAA17106@adit.ap.net>
Mime-Version: 1.0
To: Kbwms <Kbwms AT aol DOT com>, djgpp AT delorie DOT com
From: Nate Eldredge <eldredge AT ap DOT net>
Subject: Re: Compiling float, double and long double

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 -


  webmaster     delorie software   privacy  
  Copyright © 2019   by DJ Delorie     Updated Jul 2019