Subject: lib/18803: printf(3) does not handle "long double"
To: None <gnats-bugs@gnats.netbsd.org>
From: None <thorpej@shagadelic.org>
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
>Closed-Date:
>Last-Modified:
>Originator:     Jason R Thorpe
>Release:        NetBSD 1.6I
>Organization:
Wasabi Systems, Inc.
>Environment:
	
	
System: NetBSD yeah-baby.shagadelic.org 1.6I NetBSD 1.6I (YEAH-BABY-XP) #11: Sun Sep 29 17:42:25 PDT 2002 thorpej@yeah-baby.shagadelic.org:/u1/netbsd/src/sys/arch/i386/compile/YEAH-BABY-XP i386
Architecture: i386
Machine: i386
>Description:
	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).

>How-To-Repeat:
	Compile the following program with GCC 3.3:

int
main()
{
        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

>Fix:
	Not provided.
>Release-Note:
>Audit-Trail:
>Unformatted: