From patchwork Tue Sep 13 21:07:22 2016 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: "Paul E. Murphy" X-Patchwork-Id: 15604 X-Patchwork-Delegate: joseph@codesourcery.com Received: (qmail 113221 invoked by alias); 13 Sep 2016 21:07:31 -0000 Mailing-List: contact libc-alpha-help@sourceware.org; run by ezmlm Precedence: bulk List-Id: List-Unsubscribe: List-Subscribe: List-Archive: List-Post: List-Help: , Sender: libc-alpha-owner@sourceware.org Delivered-To: mailing list libc-alpha@sourceware.org Received: (qmail 113212 invoked by uid 89); 13 Sep 2016 21:07:30 -0000 Authentication-Results: sourceware.org; auth=none X-Virus-Found: No X-Spam-SWARE-Status: No, score=-1.5 required=5.0 tests=AWL, BAYES_00, KAM_LAZY_DOMAIN_SECURITY, RCVD_IN_DNSWL_LOW autolearn=no version=3.3.2 spammy=fl, Hx-languages-length:2449 X-HELO: mx0a-001b2d01.pphosted.com X-IBM-Helo: d03dlp01.boulder.ibm.com X-IBM-MailFrom: murphyp@linux.vnet.ibm.com From: "Paul E. Murphy" Subject: [PATCH] Remove __nan{f,,l} macros To: "libc-alpha@sourceware.org" Date: Tue, 13 Sep 2016 16:07:22 -0500 User-Agent: Mozilla/5.0 (X11; Linux x86_64; rv:45.0) Gecko/20100101 Thunderbird/45.2.0 MIME-Version: 1.0 X-TM-AS-GCONF: 00 X-Content-Scanned: Fidelis XPS MAILER x-cbid: 16091321-8235-0000-0000-0000092E07DC X-IBM-SpamModules-Scores: X-IBM-SpamModules-Versions: BY=3.00005756; HX=3.00000240; KW=3.00000007; PH=3.00000004; SC=3.00000185; SDB=6.00757372; UDB=6.00359140; IPR=6.00530765; BA=6.00004718; NDR=6.00000001; ZLA=6.00000005; ZF=6.00000009; ZB=6.00000000; ZP=6.00000000; ZH=6.00000000; ZU=6.00000002; MB=3.00012664; XFM=3.00000011; UTC=2016-09-13 21:07:24 X-IBM-AV-DETECTION: SAVI=unused REMOTE=unused XFE=unused x-cbparentid: 16091321-8236-0000-0000-000034CCD5DB Message-Id: <5e1bad49-d2da-4051-7778-4ca1e2b83e70@linux.vnet.ibm.com> X-Proofpoint-Virus-Version: vendor=fsecure engine=2.50.10432:, , definitions=2016-09-13_10:, , signatures=0 X-Proofpoint-Spam-Details: rule=outbound_notspam policy=outbound score=0 spamscore=0 suspectscore=0 malwarescore=0 phishscore=0 adultscore=0 bulkscore=0 classifier=spam adjust=0 reason=mlx scancount=1 engine=8.0.1-1609020000 definitions=main-1609130299 Use the GCC builtin instead. With the exception of the files built from a template, they are unused. This is preparation for making the s_nanF objects generated. * math/s_nanf.c: Remove __nanf undef. * math/s_nan.c: Remove __nan undef. * math/s_nanl.c: Remove __nanl undef. * sysdeps/generic/math_private.h (__nan): Remove macro override. (__nanf): Likewise. (__nanl): Likewise. * sysdeps/generic/math-type-macros.h (M_NAN): define using GCC builtin instead. --- math/s_nan.c | 1 - math/s_nanf.c | 1 - math/s_nanl.c | 1 - sysdeps/generic/math-type-macros.h | 2 +- sysdeps/generic/math_private.h | 7 ------- 5 files changed, 1 insertion(+), 11 deletions(-) diff --git a/math/s_nan.c b/math/s_nan.c index d9af775..03e95f5 100644 --- a/math/s_nan.c +++ b/math/s_nan.c @@ -24,7 +24,6 @@ #include -#undef __nan double __nan (const char *tagp) { diff --git a/math/s_nanf.c b/math/s_nanf.c index 0dd6778..3046720 100644 --- a/math/s_nanf.c +++ b/math/s_nanf.c @@ -24,7 +24,6 @@ #include -#undef __nanf float __nanf (const char *tagp) { diff --git a/math/s_nanl.c b/math/s_nanl.c index e6149bc..4b7b3d5 100644 --- a/math/s_nanl.c +++ b/math/s_nanl.c @@ -24,7 +24,6 @@ #include -#undef __nanl long double __nanl (const char *tagp) { diff --git a/sysdeps/generic/math-type-macros.h b/sysdeps/generic/math-type-macros.h index bd9e25a..78b883c 100644 --- a/sysdeps/generic/math-type-macros.h +++ b/sysdeps/generic/math-type-macros.h @@ -74,7 +74,7 @@ #define __M_CONCAT(a,b) a ## b #define __M_CONCATX(a,b) __M_CONCAT(a,b) -#define M_NAN M_SUF (__nan) ("") +#define M_NAN M_SUF (__builtin_nan) ("") #define M_MAX_EXP __M_CONCATX (M_PFX, _MAX_EXP) #define M_MIN __M_CONCATX (M_PFX, _MIN) #define M_MAX __M_CONCATX (M_PFX, _MAX) diff --git a/sysdeps/generic/math_private.h b/sysdeps/generic/math_private.h index 24adcfb..28e5df0 100644 --- a/sysdeps/generic/math_private.h +++ b/sysdeps/generic/math_private.h @@ -775,11 +775,4 @@ libc_feresetround_noex_ctx (struct rm_ctx *ctx) SET_RESTORE_ROUND_GENERIC (RM, libc_feholdsetround_53bit, \ libc_feresetround_53bit) -#define __nan(str) \ - (__builtin_constant_p (str) && str[0] == '\0' ? NAN : __nan (str)) -#define __nanf(str) \ - (__builtin_constant_p (str) && str[0] == '\0' ? NAN : __nan (str)) -#define __nanl(str) \ - (__builtin_constant_p (str) && str[0] == '\0' ? NAN : __nan (str)) - #endif /* _MATH_PRIVATE_H_ */