delorie.com/archives/browse.cgi   search  
Mail Archives: cygwin/2004/05/27/14:59:31

Mailing-List: contact cygwin-help AT cygwin DOT com; run by ezmlm
List-Subscribe: <mailto:cygwin-subscribe AT cygwin DOT com>
List-Archive: <http://sourceware.org/ml/cygwin/>
List-Post: <mailto:cygwin AT cygwin DOT com>
List-Help: <mailto:cygwin-help AT cygwin DOT com>, <http://sourceware.org/ml/#faqs>
Sender: cygwin-owner AT cygwin DOT com
Mail-Followup-To: cygwin AT cygwin DOT com
Delivered-To: mailing list cygwin AT cygwin DOT com
Date: Thu, 27 May 2004 20:58:59 +0200
From: "Gerrit P. Haase" <gp AT familiehaase DOT de>
Reply-To: "Gerrit @ cygwin" <cygwin AT cygwin DOT com>
Organization: Esse keine toten Tiere
Message-ID: <277403406.20040527205859@familiehaase.de>
To: mathias DOT wagner AT philips DOT com
CC: cygwin AT cygwin DOT com
Subject: Re: GCC 3.3.1 problem with printf %Lg %Lg and -m128bit-long-double compile option
In-Reply-To: <OFFB435626.E532FF68-ONC1256EA0.003FCC45-C1256EA0.00405F9A@philips.com>
References: <OFFB435626 DOT E532FF68-ONC1256EA0 DOT 003FCC45-C1256EA0 DOT 00405F9A AT philips DOT com>
MIME-Version: 1.0
X-IsSubscribed: yes

Hallo mathias,


> GCC 3.3.1 has a problem when printing multiple long double variables using
> printf and the  -m128bit-long-double compile option on a Pentium-based
> machine.

Seems to be a bug in gcc, for bug reporting instructions, please see:
http://gcc.gnu.org/bugs.html.


> compile the code below with 

>  gcc  -m128bit-long-double  test.c

> and with

> gcc  test.c

> The later will print stuff correctly in both printf statements, whereas
> the former will print fine only as long as the printf statement contains a
> single  long double variable only, but will issue garbage when printing
> more than one long double variable in the same printf statement.

> #include <stdlib.h>
> #include <stdio.h>
> #include <string.h>
> #include <math.h>

> int
> main( int argc, char *argv[] )
> {
>   long double first_long_double_variable = 5.6;
>   long double second_long_double_variable = 9.3;

>   printf ("here comes a long double %Lg\n", first_long_double_variable);
>   printf ("here come TWO long doubles %Lg %Lg\n", 
> first_long_double_variable, second_long_double_variable);

> }


> Installation Info as copied from cygcheck.out:

Please don't send cygcheck output inline an email, send it as
attachment.


Gerrit
-- 
=^..^=


--
Unsubscribe info:      http://cygwin.com/ml/#unsubscribe-simple
Problem reports:       http://cygwin.com/problems.html
Documentation:         http://cygwin.com/docs.html
FAQ:                   http://cygwin.com/faq/

- Raw text -


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