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 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> <3331145d-900b-4bef-8ad0-f533f0b4a17b AT googlegroups DOT com> <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 Precedence: bulk > From: "K.J.Williams" > 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)