X-Recipient: archive-cygwin@delorie.com
X-SWARE-Spam-Status: No, hits=-2.5 required=5.0 	tests=AWL,BAYES_00,SPF_PASS
X-Spam-Check-By: sourceware.org
Message-ID: <4AB0BE8A.6060707@gmail.com>
Date: Wed, 16 Sep 2009 11:31:38 +0100
From: Dave Korn <dave.korn.cygwin@googlemail.com>
User-Agent: Thunderbird 2.0.0.17 (Windows/20080914)
MIME-Version: 1.0
To: cygwin@cygwin.com
Subject: Re: Cygwin 1.7/1.5 C99 conformance (GCC, libc)
References: <op.u0ak2ujy1e62zd@balu.cs.uni-paderborn.de>
In-Reply-To: <op.u0ak2ujy1e62zd@balu.cs.uni-paderborn.de>
Content-Type: text/plain; charset=ISO-8859-15
Content-Transfer-Encoding: 7bit
Mailing-List: contact cygwin-help@cygwin.com; run by ezmlm
List-Id: <cygwin.cygwin.com>
List-Subscribe: <mailto:cygwin-subscribe@cygwin.com>
List-Archive: <http://sourceware.org/ml/cygwin/>
List-Post: <mailto:cygwin@cygwin.com>
List-Help: <mailto:cygwin-help@cygwin.com>, <http://sourceware.org/ml/#faqs>
Sender: cygwin-owner@cygwin.com
Mail-Followup-To: cygwin@cygwin.com
Delivered-To: mailing list cygwin@cygwin.com

Matthias Andree wrote:

> Now, Cygwin 1.5 and 1.7 appear to lack long double library support in
> libc/libm -- which is required for a hosted C99 implementation however,
> but not for a freestanding C99 implementation.
> 
> Trying to solve this, I found another Cygwin issue: GCC 3.4.4 sets
> __STDC_HOSTED__ to 1 by default (that's a GCC factory default).

  Just FTR, Cygwin-1.5 and gcc-3.4.4 are end-of-life and will never be updated
again.

> I propose that this gets overridden to 0 in Cygwin-ported GCC compilers
> until the library support for a C99-conforming full hosted
> implementation is in place, so that applications can safely check

  Sorry, I don't think that's a good idea.  There are a whole world of other
differences implied by the freestanding-vs-hosted distinction that I think it
would not be wise for the compiler to lie about.  It is indeed unfortunate
that our C library support (which derives from newlib) is incomplete, and this
gap between theory and practice is what autoconf was invented to bridge.
(Autoconf is of course a compromise born of necessity which in an ideal world
wouldn't exist.  But at least it means these problems can be dealt with in a
practical and systematic fashion.)

  It mightn't be too hard to get long double support into newlib, but it's all
a matter of someone having the time and wherewithal to actually do it.

    cheers,
      DaveK

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

