delorie.com/archives/browse.cgi   search  
Mail Archives: cygwin/2004/05/28/05:21:29

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
From: mathias DOT wagner AT philips DOT com
To: cygwin AT cygwin DOT com
Subject: Re: GCC 3.3.1 problem with printf %Lg %Lg and -m128bit-long-double compile option
MIME-Version: 1.0
Message-ID: <OF4B525423.BF84D3AE-ONC1256EA2.00331803-C1256EA2.003360F4@philips.com>
Date: Fri, 28 May 2004 11:19:31 +0200

         To:     "Gerrit @ cygwin" <cygwin AT cygwin DOT com>
        cc:     Mathias Wagner/HBG/SC/PHILIPS AT PHILIPS
        Subject:        Re: GCC 3.3.1 problem with printf %Lg %Lg and -m128bit-long-double compile 
option
        Classification: 



> On Thu, 27 May 2004, Gerrit P. Haase wrote:
> 
> > 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.
> 
> No disrespect intended Mr. GCC maintainer, but I'm pretty sure that is
> expected behavior.  See "info gcc" in the -m128bit-long-double section:
> 
>      *Warning:* if you override the default value for your target ABI,
>      the structures and arrays containing `long double' will change
>      their size as well as function calling convention for function
>      taking `long double' will be modified.  Hence they will not be
>      binary compatible with arrays or structures in code compiled
>      without that switch.
> 
> Cygwin/newlib would need to be recompiled with this switch for proper
> printf operation.  Why are you trying to use this switch, Mathias?

Thanks for these infos to both of you!

Meanwhile I have had some help from another colleague here at Philips and 
he found out that the -m96bit-long-double compile option works fine. Note 
that 96 bit is what a long double takes. This makes sense in conjunction 
with what Brian said: The alignment of the parameters handed over to a 
function is changed when using -m128bit-long-double, and hence all 
functions affected must be recompiled - so presumably cygwin itself.

There was no particular reason for using -m128bit-long-double other than 
that I have always used it, and I will switch to -m96bit-long-double. But 
perhaps one could insert somewhere in gcc a warning when using such a 
combination of compile options. I know it is in the documentation 
somewhere, but compiler warnings are much more visible... :-)

Cheers

Mathias






--
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