delorie.com/archives/browse.cgi   search  
Mail Archives: djgpp/2012/07/30/00:08:09

X-Authentication-Warning: delorie.com: mail set sender to djgpp-bounces using -f
X-Recipient: djgpp AT delorie DOT com
Date: Mon, 30 Jul 2012 07:08:08 +0300
From: Eli Zaretskii <eliz AT gnu DOT org>
Subject: Re: Upgrading from a bad C compiler
In-reply-to: <5a660313-6c6f-433d-aa5f-45be87a95493@googlegroups.com>
X-012-Sender: halo1 AT inter DOT net DOT il
To: djgpp AT delorie DOT com
Message-id: <833949hown.fsf@gnu.org>
References: <17d4b525-2c31-4c20-b3c5-a7118343e9a5 AT googlegroups DOT com> <jucp01$p35$1 AT speranza DOT aioe DOT org> <b1f8c389-45f4-43e4-9056-62fc50fc9462 AT googlegroups DOT com> <juh7c1$7hk$1 AT speranza DOT aioe DOT org> <3331145d-900b-4bef-8ad0-f533f0b4a17b AT googlegroups DOT com> <juuseq$j7b$1 AT speranza DOT aioe DOT org> <a7htthFse5U1 AT mid DOT dfncis DOT de> <jv1ect$iv$1 AT speranza DOT aioe DOT org> <83lii3hd5r DOT fsf AT gnu DOT org> <5a660313-6c6f-433d-aa5f-45be87a95493 AT googlegroups DOT com>
Reply-To: djgpp AT delorie DOT com
Errors-To: nobody AT delorie DOT com
X-Mailing-List: djgpp AT delorie DOT com
X-Unsubscribes-To: listserv AT delorie DOT com

> From: "K.J.Williams" <lordwilliams1972 AT gmail DOT com>
> Date: Sun, 29 Jul 2012 19:51:27 -0700 (PDT)
> Cc: djgpp AT delorie DOT com
> 
> if long double is legal in C.....(I don't recall this in the C99) 

Of course, it is!

> That actually would have to be :
> 
> int main(void)
> {
>     long double foo;
>     printf("size of long double = %d\r\n", sizeof(foo));
> 
>     return 0;
> }

And the difference between this and my program is...?

> long double would have to be defined in limits.h

??? Primitive data types are never declared in any header, let alone
limits.h.

If you mean the largest and the smallest value of long double, then
you have this in float.h:

  #define LDBL_DIG        18
  #define LDBL_EPSILON    __dj_long_double_epsilon
  #define LDBL_MANT_DIG   64
  #define LDBL_MAX        __dj_long_double_max
  #define LDBL_MAX_10_EXP 4932
  #define LDBL_MAX_EXP    16384
  #define LDBL_MIN        __dj_long_double_min
  #define LDBL_MIN_10_EXP (-4931)
  #define LDBL_MIN_EXP    (-16381)

- Raw text -


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