delorie.com/archives/browse.cgi   search  
Mail Archives: djgpp-workers/2011/07/01/11:22:19

X-Authentication-Warning: delorie.com: mail set sender to djgpp-workers-bounces using -f
X-Recipient: djgpp-workers AT delorie DOT com
DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed;
d=gmail.com; s=gamma;
h=mime-version:in-reply-to:references:date:message-id:subject:from:to
:content-type;
bh=j9my2YBT6+MJb1cl+Ka0IsBE/rKzvjxAy2iKjReSGCU=;
b=n0C8fy8Q4YOOl9u5UGE8txvhjg8GRoLm2BRU/el9YzI4B8j6W0j55gRy7APqf8xu2o
zkcVHWX6m+nCuEYFrovGZ9AjkJxJ0dFcRrHbkCHifjsLv2v/95EdWBubHu1qyGMxOgPz
GyVJsAggxxrIj4ZxbuJ9/oeKd5MjUVgmmoQt8=
MIME-Version: 1.0
In-Reply-To: <83tyb6qce3.fsf@gnu.org>
References: <BANLkTikW3CVu0QEHyFwgfpvzqNoMR6Tfrg AT mail DOT gmail DOT com>
<83tyb6qce3 DOT fsf AT gnu DOT org>
Date: Fri, 1 Jul 2011 18:22:08 +0300
Message-ID: <BANLkTi=q_JbhptgWTi8ZN7mtq9NO9zPX0g@mail.gmail.com>
Subject: Re: gcc-4.4: conflicting types for built-in function 'cabs' and 'cabsf'
From: Ozkan Sezer <sezeroz AT gmail DOT com>
To: djgpp-workers AT delorie DOT com
Reply-To: djgpp-workers AT delorie DOT com
Errors-To: nobody AT delorie DOT com
X-Mailing-List: djgpp-workers AT delorie DOT com
X-Unsubscribes-To: listserv AT delorie DOT com

On Fri, Jul 1, 2011 at 5:55 PM, Eli Zaretskii <eliz AT gnu DOT org> wrote:
>> Date: Fri, 1 Jul 2011 17:25:52 +0300
>> From: Ozkan Sezer <sezeroz AT gmail DOT com>
>>
>> Bulidding the library (today's cvs) using gcc-4.4 fails with the
>> following error:
>>
>> i586-pc-msdosdjgpp-gcc -pipe ... -c w_cabs.c
>> cc1: warnings being treated as errors
>> w_cabs.c:18: error: conflicting types for built-in function 'cabs'
>>
>> i586-pc-msdosdjgpp-gcc -pipe ... -c wf_cabs.c
>> cc1: warnings being treated as errors
>> wf_cabs.c:18: error: conflicting types for built-in function 'cabsf'
>>
>> Solutions?
>
> Hard to tell, since you don't show the conflicting declarations.
>

Obviously, if you look at src/libm/math/w_cabs.c :

struct complex {
	double x;
	double y;
};

#ifdef __STDC__
double cabs(struct complex);
double cabs(struct complex z)
[...]

Similar for cabsf()

OTOH, glibc man page says:
#include <complex.h>

double cabs(double complex z);
float cabsf(float complex z);

... and builtins.def of gcc says:

/* Category: _Complex math builtins.  */
DEF_C99_BUILTIN        (BUILT_IN_CABS, "cabs",
BT_FN_DOUBLE_COMPLEX_DOUBLE, ATTR_MATHFN_FPROUNDING)

--
O.S.

- Raw text -


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