Subject: lib/18803: printf(3) does not handle "long double"
To: None <>
From: None <>
List: netbsd-bugs
Date: 10/25/2002 15:08:29
>Number:         18803
>Category:       lib
>Synopsis:       printf(3) does not handle "long double"
>Confidential:   no
>Severity:       serious
>Priority:       high
>Responsible:    lib-bug-people
>State:          open
>Class:          sw-bug
>Submitter-Id:   net
>Arrival-Date:   Fri Oct 25 15:09:00 PDT 2002
>Originator:     Jason R Thorpe
>Release:        NetBSD 1.6I
Wasabi Systems, Inc.
System: NetBSD 1.6I NetBSD 1.6I (YEAH-BABY-XP) #11: Sun Sep 29 17:42:25 PDT 2002 i386
Architecture: i386
Machine: i386
	printf(3) does not properly handle the "long double" type
	when it is not equivalent to the "double" type.

	This causes GCC 3.3's libstdc++-v3 to get incorrect
	numeric limits (shows up as testsuite failures).

	Compile the following program with GCC 3.3:

        printf("sizeof double = %d\n", sizeof(double));
        printf("sizeof long double = %d\n", sizeof(long double));

        printf("double max = %g\n", __DBL_MAX__);
        printf("long double max = %Lg\n", __LDBL_MAX__);

        return 0;

	...and run it:

sizeof double = 8
sizeof long double = 12
double max = 1.79769e+308
long double max = inf

	Not provided.