From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (qmail 25373 invoked by alias); 18 May 2004 13:06:50 -0000 Mailing-List: contact gcc-bugs-help@gcc.gnu.org; run by ezmlm Precedence: bulk List-Archive: List-Post: List-Help: Sender: gcc-bugs-owner@gcc.gnu.org Received: (qmail 25325 invoked by alias); 18 May 2004 13:06:47 -0000 Date: Tue, 18 May 2004 23:18:00 -0000 Message-ID: <20040518130647.25318.qmail@sourceware.org> From: "ro at techfak dot uni-bielefeld dot de" To: gcc-bugs@gcc.gnu.org In-Reply-To: <20040503154240.15266.ro@techfak.uni-bielefeld.de> References: <20040503154240.15266.ro@techfak.uni-bielefeld.de> Reply-To: gcc-bugzilla@gcc.gnu.org Subject: [Bug libfortran/15266] [gfortran] libgfortran doesn't compile on IRIX 5.3 X-Bugzilla-Reason: CC X-SW-Source: 2004-05/txt/msg01988.txt.bz2 List-Id: ------- Additional Comments From ro at techfak dot uni-bielefeld dot de 2004-05-18 13:06 ------- Subject: Re: [gfortran] libgfortran doesn't compile on IRIX 5.3 pinskia at gcc dot gnu dot org writes: > Yes and IIRC when IRIX (if ever) gets C99 most of everyone's code gets broken if they used csqrtf. This is about cabs and friends on IRIX, but even so, not at all: IRIX 6.5.18 and up have C99 support, which is done like this: (included from ) has #if !defined(__c99) struct __cabs_s { double a,b; }; extern double cabs(struct __cabs_s); [...] #endif and has /* C99: 7.3.8.1 */ /* c89 also had functions cabs, cabsf and cabsl with the following * prototypes. * * double cabs (struct { double a,b; } z); * float cabsf (struct { float a,b; } z); * long double cabsl (struct { long double a,b; } z); * * As the passing of structs by value is different from passing * complex by value for the float and long double cases, the following * changes are being done to the C99 functions so as to maintain * backwards compatibility. * * For the C99 functions we provide static definitions of these, * which in turn call the corresponding library functions with a __c99_ * prefix. * * There are two drawbacks of this approach * * 1. As each compilation will get its own copy of these functions, * any program which relies on the address of these functions being * unique will fail. * * 2. If the user rolls his own version of these functions, they will * never get invoked, and to get around this problem, the user * should be able to disable the generation of these static functions. * This is achieved by adding -D_C99_CABS_USER_DEFINED to the commandline. */ extern double __c99_cabs (double complex); extern float __c99_cabsf (float complex); extern long double __c99_cabsl (long double complex); #pragma optional __c99_cabs #pragma optional __c99_cabsf #pragma optional __c99_cabsl #ifdef _C99_CABS_USER_DEFINED extern double cabs (double complex); extern float cabsf (float complex); extern long double cabsl (long double complex); #else static inline double cabs (double complex z) {return __c99_cabs(z); } static inline float cabsf (float complex z) {return __c99_cabsf(z);} static inline long double cabsl (long double complex z) {return __c99_cabsl(z);} #endif /* _C99_CABS_USER_DEFINED */ These vendors usually know (and care) about backwards source and binary compatibility. Rainer -- http://gcc.gnu.org/bugzilla/show_bug.cgi?id=15266