From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (qmail 15104 invoked by alias); 24 Oct 2010 15:21:52 -0000 Received: (qmail 15095 invoked by uid 22791); 24 Oct 2010 15:21:51 -0000 X-SWARE-Spam-Status: No, hits=-2.4 required=5.0 tests=ALL_TRUSTED,AWL,BAYES_00,MISSING_MID X-Spam-Check-By: sourceware.org Received: from localhost (HELO gcc.gnu.org) (127.0.0.1) by sourceware.org (qpsmtpd/0.43rc1) with ESMTP; Sun, 24 Oct 2010 15:21:46 +0000 From: "joseph at codesourcery dot com" To: gcc-bugs@gcc.gnu.org Subject: [Bug c/46155] Bug with generation of float.h header file on AIX X-Bugzilla-Reason: CC X-Bugzilla-Type: changed X-Bugzilla-Watch-Reason: None X-Bugzilla-Product: gcc X-Bugzilla-Component: c X-Bugzilla-Keywords: X-Bugzilla-Severity: normal X-Bugzilla-Who: joseph at codesourcery dot com X-Bugzilla-Status: UNCONFIRMED X-Bugzilla-Priority: P3 X-Bugzilla-Assigned-To: unassigned at gcc dot gnu.org X-Bugzilla-Target-Milestone: --- X-Bugzilla-Changed-Fields: In-Reply-To: References: X-Bugzilla-URL: http://gcc.gnu.org/bugzilla/ Auto-Submitted: auto-generated Content-Type: text/plain; charset="UTF-8" MIME-Version: 1.0 Date: Sun, 24 Oct 2010 15:21:00 -0000 Mailing-List: contact gcc-bugs-help@gcc.gnu.org; run by ezmlm Precedence: bulk List-Id: List-Archive: List-Post: List-Help: Sender: gcc-bugs-owner@gcc.gnu.org X-SW-Source: 2010-10/txt/msg02030.txt.bz2 Message-ID: <20101024152100.3KlwVBWEMsVnETcRs_gq496g5pF3EeHcOrH4MFDKU1Y@z> http://gcc.gnu.org/bugzilla/show_bug.cgi?id=46155 --- Comment #8 from joseph at codesourcery dot com 2010-10-24 15:21:44 UTC --- On Sun, 24 Oct 2010, david.kirkby at onetel dot net wrote: > I don't have a copy of the C standard. Is there one publicly available? In your > opinion, are IBM wrong to define fprnd_t in /usr/include/float.h? AIX 5.3 is a > POSIX certified operating system. http://www.open-std.org/jtc1/sc22/wg14/www/docs/n1256.pdf (the standard as consolidated with subsequent TCs) POSIX reserves *_t. ISO C does not. An ISO C program may do: #define fprnd_t something random #include (A POSIX program would need to define a feature test macro such as _POSIX_C_SOURCE, at which point fprnd_t becomes reserved, although the function names you listed still aren't reserved.) > > I haven't seen documentation for those functions and types, but they sound > > rather like they should be obsoleted by the standard facilities > > such as fegetround and fesetround. > > According to > > http://www.gnu.org/software/gnulib/manual/html_node/fesetround.html > > fegetround() is not very portable, so I doubt the GSL developers would want to > use that. I've found GSL to be very portable. It seems to build on just about > anything - except AIX, unless one makes a few changes to a source file. All the systems listed there are old systems. ISO C99 was published on 1 December 1999 - nearly 11 years ago. It appears that GSL has code that uses the C99 interfaces (fp-gnuc99.c). I'd advise using that in preference to all the other pre-C99 OS-specific interfaces, whenever the C99 interfaces are available, rather than as the very last alternative. If AIX supports the C99 interfaces, that solves your problem.