delorie.com/archives/browse.cgi   search  
Mail Archives: djgpp/1997/08/20/10:52:30

Date: Wed, 20 Aug 1997 17:49:50 +0300 (IDT)
From: Eli Zaretskii <eliz AT is DOT elta DOT co DOT il>
To: Einstein <einstein DOT lam AT usa DOT net>
cc: djgpp AT delorie DOT com
Subject: Re: sizeof(long double)==12
In-Reply-To: <33F9958D.656992B2@usa.net>
Message-ID: <Pine.SUN.3.91.970820174909.24006K-100000@is>
MIME-Version: 1.0

On Tue, 19 Aug 1997, Einstein wrote:

> #includ <iostream.h>
> 
> void
> main()
> {
>     cout << sizeof(long double) << endl;
>     cout << (sizeof(long double)==12) << endl;
> }
> 
> Any one have tried this program in djgpp?

I have (I only changed it to be "int main(void)" and added "return 0;"
at the end).

It printed this:

   12
   1

In other words, in DJGPP sizeof(long double) returns 12.

If you find this surprising, please read section 22.9 of the DJGPP FAQ
list (v2/faq210b.zip from the same place you get DJGPP) which explains
this in detail.

- Raw text -


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