This is the mail archive of the newlib@sourceware.org mailing list for the newlib project.


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]
Other format: [Raw text]

Re: Long double complex methods


Hello Developers,

I have fixed the warnings related to cacoshl, casinhl, cargl etc what
Joel Had pointed out.. This is the patch. i am requesting you to
please check it and tell me whether i have correctly fixed the
warnings or not ?

Thanks & Regards,
Aditya Upadhyay

On Fri, Jun 30, 2017 at 2:41 PM, Aditya Upadhyay <aadit0402@gmail.com> wrote:
> I am tring to resolve the warnings. Thank you for pointing it out.
>
>
> Regards,
> Aditya
>
> On Fri, Jun 30, 2017 at 2:47 AM, Joel Sherrill
> <joel.sherrill@oarcorp.com> wrote:
>>
>>
>> On 6/29/2017 2:38 PM, Yaakov Selkowitz wrote:
>>>
>>> On 2017-06-29 07:04, Corinna Vinschen wrote:
>>>>
>>>> On Jun 29 13:53, Corinna Vinschen wrote:
>>>>>
>>>>> On Jun 29 12:41, Aditya Upadhyay wrote:
>>>>>>
>>>>>> Hello Developers,
>>>>>>
>>>>>> This is the modified patch for csinl.c which reflects changes in
>>>>>> Makefile.am.
>>>>>
>>>>>
>>>>> Uhm... this patch now contains *only* the Makefile.am change, but
>>>>> not the expected csinl.c file.
>>>>>
>>>>> v3? ;)
>>>>
>>>>
>>>> Never mind, I'm going to apply v1 and v2 of patch 18.  However, usually
>>>> a v2 (or v3, v4, ...) of a patch is expected to replace the v1 of the
>>>> patch entirely, not that it just contains a diff to v1.
>>>>
>>>> I pushed the set now and regenerated complex/Makefile.in.
>>>
>>>
>>> This patchset is causing errors when building Cygwin:
>>>
>>> newlib/libm/complex/cargl.c: In function  cargl’:
>>> newlib/libm/complex/cargl.c:16:25: error: implicit declaration of
>>> function ‘imag’ [-Werror=implicit-function-declaration]
>>>             return atan2l (imag (z), real (z));
>>>                            ^
>>> newlib/libm/complex/cargl.c:16:35: error: implicit declaration of
>>> function ‘real’ [-Werror=implicit-function-declaration]
>>>             return atan2l (imag (z), real (z));
>>>                                      ^
>>>
>>
>> It builds for RTEMS (sparc) with some new warnings:
>>
>> newlib/libm/complex/cacoshl.c:42:16: warning: implicit declaration of
>> function 'csqrtl'; did you mean 'csqrtf'? [-Wimplicit-function-declaration]
>> newlib/libm/complex/cacoshl.c:42:6: warning: implicit declaration of
>> function 'clogl'; did you mean 'clogf'? [-Wimplicit-function-declaration]
>> newlib/libm/complex/cacosl.c:41:6: warning: implicit declaration of function
>> 'casinl'; did you mean 'asinl'? [-Wimplicit-function-declaration]
>> newlib/libm/complex/casinhl.c:39:18: warning: implicit declaration of
>> function 'casinl'; did you mean 'casinhl'? [-Wimplicit-function-declaration]
>> newlib/libm/complex/casinl.c:112:7: warning: implicit declaration of
>> function 'csqrtl'; did you mean 'sqrtl'? [-Wimplicit-function-declaration]
>> newlib/libm/complex/casinl.c:115:7: warning: implicit declaration of
>> function 'clogl'; did you mean 'logl'? [-Wimplicit-function-declaration]
>> newlib/libm/complex/catanhl.c:39:18: warning: implicit declaration of
>> function 'catanl'; did you mean 'catanhl'? [-Wimplicit-function-declaration]
>> newlib/libm/complex/cpowl.c:47:9: warning: implicit declaration of function
>> 'cargl'; did you mean 'cargf'? [-Wimplicit-function-declaration]
>>
>> I don't see any Cygwin ifdef's related to imag()
>> so I built for i386-rtems to see if it was related
>> to _LDBL_EQ_DBL. i386-rtems built with a few warnings.
>>
>> We have an x86_64-rtems tool target in anticipation of
>> a port. I built a tool chain just to check this and
>> the newlib master built cleanly on that.
>>
>> I am sorry but I am not duplicating this. What would
>> be different about Cygwin in this case?
>>
>> --joel
>>
From 292d920b1210c67684b13ad82fc56c7201c5ee59 Mon Sep 17 00:00:00 2001
From: Aditya Upadhyay <aadit0402@gmail.com>
Date: Wed, 5 Jul 2017 02:56:15 +0530
Subject: [PATCH] Fixed warnings for some long double complex methods

---
 newlib/libc/include/complex.h | 13 +++++++++----
 1 file changed, 9 insertions(+), 4 deletions(-)

diff --git a/newlib/libc/include/complex.h b/newlib/libc/include/complex.h
index 89d6162..af2a3ce 100644
--- a/newlib/libc/include/complex.h
+++ b/newlib/libc/include/complex.h
@@ -24,10 +24,12 @@ float complex cacosf(float complex);
 /* 7.3.5.2 The casin functions */
 double complex casin(double complex);
 float complex casinf(float complex);
+long double complex casinl(long double complex);
 
 /* 7.3.5.1 The catan functions */
 double complex catan(double complex);
 float complex catanf(float complex);
+long double complex catanl(long double complex);
 
 /* 7.3.5.1 The ccos functions */
 double complex ccos(double complex);
@@ -74,6 +76,7 @@ float complex cexpf(float complex);
 /* 7.3.7.2 The clog functions */
 double complex clog(double complex);
 float complex clogf(float complex);
+long double complex clogl(long double complex);
 
 /* 7.3.8 Power and absolute-value functions */
 /* 7.3.8.1 The cabs functions */
@@ -94,11 +97,13 @@ float complex cpowf(float complex, float complex);
 /* 7.3.8.3 The csqrt functions */
 double complex csqrt(double complex);
 float complex csqrtf(float complex);
+long double complex csqrtl(long double complex);
 
 /* 7.3.9 Manipulation functions */
 /* 7.3.9.1 The carg functions */ 
 double carg(double complex);
 float cargf(float complex);
+long double cargl(long double complex);
 
 /* 7.3.9.2 The cimag functions */
 double cimag(double complex);
@@ -125,8 +130,8 @@ float complex clog10f(float complex);
 
 #if defined(__CYGWIN__)
 long double complex cacosl(long double complex);
-long double complex casinl(long double complex);
-long double complex catanl(long double complex);
+
+
 long double complex ccosl(long double complex);
 long double complex csinl(long double complex);
 long double complex ctanl(long double complex);
@@ -139,8 +144,8 @@ long double complex ctanhl(long double complex);
 long double complex cexpl(long double complex);
 long double complex clogl(long double complex);
 long double complex cpowl(long double complex, long double complex);
-long double complex csqrtl(long double complex);
-long double cargl(long double complex);
+
+
 long double complex conjl(long double complex);
 long double complex cprojl(long double complex);
 #if __GNU_VISIBLE
-- 
2.7.4


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]