[{"id":1764764,"web_url":"http://patchwork.ozlabs.org/comment/1764764/","msgid":"<alpine.DEB.2.20.1709071437260.21759@digraph.polyomino.org.uk>","list_archive_url":null,"date":"2017-09-07T14:39:42","subject":"Re: [PATCH 2/3] powerpc: Add redirection for finitef128, isinf128, \n\tand isnanf128","submitter":{"id":4349,"url":"http://patchwork.ozlabs.org/api/people/4349/","name":"Joseph Myers","email":"joseph@codesourcery.com"},"content":"On Thu, 7 Sep 2017, Gabriel F. T. Gomes wrote:\n\n> This patch defines __finitef128 as __redirect___finitef128 in\n> sysdeps/powerpc/powerpc64/fpu/multiarch/s_finite.c, similarly to what's\n> done for the float, double, and long double versions of these functions,\n> to get rid of the build error.  Likewise for isinff128 and isnanf128.\n\nWhat is the build error?  Why should s_finite.c need to redirect \n__finitef128, or to redirect __finitef or __finitel for that matter?  \ns_finitef.c manages to redirect only __finitef, not any of the other \nversions, after all.","headers":{"Return-Path":"<libc-alpha-return-84298-incoming=patchwork.ozlabs.org@sourceware.org>","X-Original-To":"incoming@patchwork.ozlabs.org","Delivered-To":["patchwork-incoming@bilbo.ozlabs.org","mailing list libc-alpha@sourceware.org"],"Authentication-Results":["ozlabs.org;\n\tspf=pass (mailfrom) smtp.mailfrom=sourceware.org\n\t(client-ip=209.132.180.131; helo=sourceware.org;\n\tenvelope-from=libc-alpha-return-84298-incoming=patchwork.ozlabs.org@sourceware.org;\n\treceiver=<UNKNOWN>)","ozlabs.org; dkim=pass (1024-bit key;\n\tsecure) header.d=sourceware.org header.i=@sourceware.org\n\theader.b=\"E4yFMh7t\"; dkim-atps=neutral","sourceware.org; auth=none"],"Received":["from sourceware.org (server1.sourceware.org [209.132.180.131])\n\t(using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256\n\tbits)) (No client certificate requested)\n\tby ozlabs.org (Postfix) with ESMTPS id 3xp35K0hc7z9sRY\n\tfor <incoming@patchwork.ozlabs.org>;\n\tFri,  8 Sep 2017 00:40:04 +1000 (AEST)","(qmail 15305 invoked by alias); 7 Sep 2017 14:39:58 -0000","(qmail 15288 invoked by uid 89); 7 Sep 2017 14:39:58 -0000"],"DomainKey-Signature":"a=rsa-sha1; c=nofws; d=sourceware.org; h=list-id\n\t:list-unsubscribe:list-subscribe:list-archive:list-post\n\t:list-help:sender:date:from:to:cc:subject:in-reply-to:message-id\n\t:references:mime-version:content-type; q=dns; s=default; b=Z7Lhy\n\tD+OtX0PDe750n134j/f0vINLG28YIRUpgREh9JYeuzeVyRZUv8NMH2pF6H3l9V3U\n\t2UtLxma7iDz5jqxCSi+5rI4BsJEJnNMG31sKhVq0Lyk9kcd+LGQ9LhIGrPHoce9d\n\t6SBOzUSzTjbzj2ro+HeBY343dB78nHiv2LfS1Y=","DKIM-Signature":"v=1; a=rsa-sha1; c=relaxed; d=sourceware.org; h=list-id\n\t:list-unsubscribe:list-subscribe:list-archive:list-post\n\t:list-help:sender:date:from:to:cc:subject:in-reply-to:message-id\n\t:references:mime-version:content-type; s=default; bh=gRLQWhVQvEK\n\tHsIqx+iJNfgtfG2E=; b=E4yFMh7toSchMdm2RmIxDxd08Q5DizTLEj+uRLuwxGR\n\tVfStXOlM5wr1fIJT5NCcUf4q8Xtk4u1Pb4CP/mGUM1cHyatzoW+QPsfdKnU1Y065\n\tjp52QYj0o4ad48Bdkxcxz0Sehimdw+RhD/PghQ3jKpVDH0Z/rACBSh6DGZZXbjPo\n\t=","Mailing-List":"contact libc-alpha-help@sourceware.org; run by ezmlm","Precedence":"bulk","List-Id":"<libc-alpha.sourceware.org>","List-Unsubscribe":"<mailto:libc-alpha-unsubscribe-incoming=patchwork.ozlabs.org@sourceware.org>","List-Subscribe":"<mailto:libc-alpha-subscribe@sourceware.org>","List-Archive":"<http://sourceware.org/ml/libc-alpha/>","List-Post":"<mailto:libc-alpha@sourceware.org>","List-Help":"<mailto:libc-alpha-help@sourceware.org>,\n\t<http://sourceware.org/ml/#faqs>","Sender":"libc-alpha-owner@sourceware.org","X-Virus-Found":"No","X-Spam-SWARE-Status":"No, score=-2.0 required=5.0 tests=AWL, BAYES_00,\n\tRCVD_IN_DNSWL_NONE, SPF_PASS,\n\tURIBL_RED autolearn=ham version=3.3.2 spammy=HTo:D*br, Gabriel","X-HELO":"relay1.mentorg.com","Date":"Thu, 7 Sep 2017 14:39:42 +0000","From":"Joseph Myers <joseph@codesourcery.com>","To":"\"Gabriel F. T. Gomes\" <gabriel@inconstante.eti.br>","CC":"<libc-alpha@sourceware.org>","Subject":"Re: [PATCH 2/3] powerpc: Add redirection for finitef128, isinf128, \n\tand isnanf128","In-Reply-To":"<20170907104352.7748-3-gabriel@inconstante.eti.br>","Message-ID":"<alpine.DEB.2.20.1709071437260.21759@digraph.polyomino.org.uk>","References":"<20170907104352.7748-1-gabriel@inconstante.eti.br>\n\t<20170907104352.7748-3-gabriel@inconstante.eti.br>","User-Agent":"Alpine 2.20 (DEB 67 2015-01-07)","MIME-Version":"1.0","Content-Type":"text/plain; charset=\"US-ASCII\"","X-ClientProxiedBy":"svr-ies-mbx-01.mgc.mentorg.com (139.181.222.1) To\n\tsvr-ies-mbx-01.mgc.mentorg.com (139.181.222.1)"}},{"id":1765458,"web_url":"http://patchwork.ozlabs.org/comment/1765458/","msgid":"<20170908122540.4ee0fffb@keller>","list_archive_url":null,"date":"2017-09-08T15:25:40","subject":"Re: [PATCH 2/3] powerpc: Add redirection for finitef128, isinf128, \n\tand isnanf128","submitter":{"id":72317,"url":"http://patchwork.ozlabs.org/api/people/72317/","name":"Gabriel F. T. Gomes","email":"gabriel@inconstante.eti.br"},"content":"On Thu, 7 Sep 2017 14:39:42 +0000\nJoseph Myers <joseph@codesourcery.com> wrote:\n\n>On Thu, 7 Sep 2017, Gabriel F. T. Gomes wrote:\n>\n>> This patch defines __finitef128 as __redirect___finitef128 in\n>> sysdeps/powerpc/powerpc64/fpu/multiarch/s_finite.c, similarly to what's\n>> done for the float, double, and long double versions of these functions,\n>> to get rid of the build error.  Likewise for isinff128 and isnanf128.  \n>\n>What is the build error?  Why should s_finite.c need to redirect \n>__finitef128, or to redirect __finitef or __finitel for that matter?  \n>s_finitef.c manages to redirect only __finitef, not any of the other \n>versions, after all.\n\nI'm sorry for not making this clear in the patch itself.  I'll try to\nexplain what was my rationale and if that sounds OK, I'll add that to the\ncommit message and comments.\n\nThis is the build error:\n\nIn file included from <command-line>:0:0:\n../include/math.h:29:15: error: ‘__finitef128’ undeclared here (not in a function); did you mean ‘__rintf128’?\n hidden_proto (__finitef128)\n               ^~~~~~~~~~~~\n./../include/libc-symbols.h:518:27: note: in definition of macro ‘__hidden_proto’\n   extern thread __typeof (name) name __hidden_proto_hiddenattr (attrs);\n                           ^~~~\n../include/math.h:29:1: note: in expansion of macro ‘hidden_proto’\n hidden_proto (__finitef128)\n ^~~~~~~~~~~~\n\nThe output of the preprocessor has the following lines (snippets):\n\n# 21 \"../math/bits/mathcalls-helper-functions.h\"\n[...]\nextern int __redirect___finite (double __value) __attribute__ ((__nothrow__ )) __attribute__ ((__const__));\n[...]\nextern int __redirect___finitef (float __value) __attribute__ ((__nothrow__ )) __attribute__ ((__const__));\n[...]\nextern int __redirect___finitel (long double __value) __attribute__ ((__nothrow__ )) __attribute__ ((__const__));\n[...]\nextern int __redirect___finitef128 (_Float128 __value) __attribute__ ((__nothrow__ )) __attribute__ ((__const__));\n\n(from the multiple inclusions of mathcalls-helper-functions.h (see comment\nabout the differences between s_finite.c and s_finitef.c further down this\nmessage))\n\nBut include/math.h declares hidden prototypes for them (snippet):\n\n# 9 \"../include/math.h\" 2\n[...]\nextern __typeof (__redirect___finite) __redirect___finite __attribute__ ((visibility (\"hidden\")));\n[...]\nextern __typeof (__redirect___finitef) __redirect___finitef __attribute__ ((visibility (\"hidden\")));\n[...]\nextern __typeof (__redirect___finitel) __redirect___finitel __attribute__ ((visibility (\"hidden\")));\n[...]\nextern __typeof (__finitef128) __finitef128 __attribute__ ((visibility (\"hidden\")));\n                 ~~~~~~~~~~~\nHere's the source of the error.\n\n\nAs for the difference between s_finite.c and s_finitef.c, that happens\nbecause include/math.h includes math/math.h before creating the hidden\nprototypes.\n\nOn top of that, math/math.h includes bits/mathcalls-helper-functions.h\n(once for each floating-point type).  However, the declarations in\nbits/mathcalls-helper-functions.h are macroized using __MATHDECL_1.\n__MATHDECL_1 receives the suffix (f, l, f128, or nothing) as a parameter\nand expands the base name (e.g.: __finite).\n\nWhen s_finite.c defines __finite as __redirect_finite, all declarations in\nbits/mathcalls-helper-functions.h are also redefined.  That doesn't happen\nwith s_finitef.c because it only defines __finitef, which does not match\nwith anything in bits/mathcalls-helper-functions.h.","headers":{"Return-Path":"<libc-alpha-return-84383-incoming=patchwork.ozlabs.org@sourceware.org>","X-Original-To":"incoming@patchwork.ozlabs.org","Delivered-To":["patchwork-incoming@bilbo.ozlabs.org","mailing list libc-alpha@sourceware.org"],"Authentication-Results":["ozlabs.org;\n\tspf=pass (mailfrom) smtp.mailfrom=sourceware.org\n\t(client-ip=209.132.180.131; helo=sourceware.org;\n\tenvelope-from=libc-alpha-return-84383-incoming=patchwork.ozlabs.org@sourceware.org;\n\treceiver=<UNKNOWN>)","ozlabs.org; dkim=pass (1024-bit key;\n\tsecure) header.d=sourceware.org header.i=@sourceware.org\n\theader.b=\"pjXV3azw\"; dkim-atps=neutral","sourceware.org; auth=none"],"Received":["from sourceware.org (server1.sourceware.org [209.132.180.131])\n\t(using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256\n\tbits)) (No client certificate requested)\n\tby ozlabs.org (Postfix) with ESMTPS id 3xph3w5HZlz9s2G\n\tfor <incoming@patchwork.ozlabs.org>;\n\tSat,  9 Sep 2017 01:26:04 +1000 (AEST)","(qmail 106709 invoked by alias); 8 Sep 2017 15:25:57 -0000","(qmail 105573 invoked by uid 89); 8 Sep 2017 15:25:56 -0000"],"DomainKey-Signature":"a=rsa-sha1; c=nofws; d=sourceware.org; h=list-id\n\t:list-unsubscribe:list-subscribe:list-archive:list-post\n\t:list-help:sender:date:from:to:cc:subject:message-id:in-reply-to\n\t:references:mime-version:content-type:content-transfer-encoding;\n\tq=dns; s=default; b=uZje6J8f/y7vZVY0qw7VE3IwjTwIJF83orRKutqiORk\n\t4r7ohg/wMyiJge9BTolr1D/SgM8CFp+fjDZkFa0k26Fe5qZnGPKut+W4qJhpUJup\n\t9pvXL5N7GBi3wWNOm7Z5OmOV+AKdjElfdonmlgAPFpbKGnsHLL8eq8LXIxiy63GY\n\t=","DKIM-Signature":"v=1; a=rsa-sha1; c=relaxed; d=sourceware.org; h=list-id\n\t:list-unsubscribe:list-subscribe:list-archive:list-post\n\t:list-help:sender:date:from:to:cc:subject:message-id:in-reply-to\n\t:references:mime-version:content-type:content-transfer-encoding;\n\ts=default; bh=ps0DzMmbbhApGdw/eediIoS8VCo=; b=pjXV3azwISAT34yrW\n\tGZTfosnXtr2wysO6tUZkZeeVfKDbKAsBr3N392RenVx5Ullw5UPBYNT2iV4lk8Ny\n\t3yw3oebxSUTT5Hjz3ru+BvR831xMqJRd+nNKSq/eNHkuDcN+lQvOYBR2c/h1/iGb\n\tbD0IO/FvqyZmE7vCVTnpUMFvLY=","Mailing-List":"contact libc-alpha-help@sourceware.org; run by ezmlm","Precedence":"bulk","List-Id":"<libc-alpha.sourceware.org>","List-Unsubscribe":"<mailto:libc-alpha-unsubscribe-incoming=patchwork.ozlabs.org@sourceware.org>","List-Subscribe":"<mailto:libc-alpha-subscribe@sourceware.org>","List-Archive":"<http://sourceware.org/ml/libc-alpha/>","List-Post":"<mailto:libc-alpha@sourceware.org>","List-Help":"<mailto:libc-alpha-help@sourceware.org>,\n\t<http://sourceware.org/ml/#faqs>","Sender":"libc-alpha-owner@sourceware.org","X-Virus-Found":"No","X-Spam-SWARE-Status":"No, score=-2.2 required=5.0 tests=AWL, BAYES_00,\n\tKAM_LAZY_DOMAIN_SECURITY, RCVD_IN_DNSWL_NONE,\n\tURIBL_RED autolearn=no version=3.3.2 spammy=H*F:D*br","X-HELO":"mo20.mail-out.ovh.net","Date":"Fri, 8 Sep 2017 12:25:40 -0300","From":"\"Gabriel F. T. Gomes\" <gabriel@inconstante.eti.br>","To":"Joseph Myers <joseph@codesourcery.com>","CC":"<libc-alpha@sourceware.org>","Subject":"Re: [PATCH 2/3] powerpc: Add redirection for finitef128, isinf128, \n\tand isnanf128","Message-ID":"<20170908122540.4ee0fffb@keller>","In-Reply-To":"<alpine.DEB.2.20.1709071437260.21759@digraph.polyomino.org.uk>","References":"<20170907104352.7748-1-gabriel@inconstante.eti.br>\n\t<20170907104352.7748-3-gabriel@inconstante.eti.br>\n\t<alpine.DEB.2.20.1709071437260.21759@digraph.polyomino.org.uk>","MIME-Version":"1.0","Content-Type":"text/plain; charset=\"UTF-8\"","Content-Transfer-Encoding":"quoted-printable","X-ClientProxiedBy":"EX2.emp.local (172.16.2.2) To EX2.emp.local (172.16.2.2)","X-Ovh-Tracer-Id":"13150510913213157101","X-VR-SPAMSTATE":"OK","X-VR-SPAMSCORE":"-100","X-VR-SPAMCAUSE":"gggruggvucftvghtrhhoucdtuddrfeelledrfeeggdeltdcutefuodetggdotefrodftvfcurfhrohhfihhlvgemucfqggfjpdevjffgvefmvefgnecuuegrihhlohhuthemuceftddtnecusecvtfgvtghiphhivghnthhsucdlqddutddtmd"}},{"id":1765497,"web_url":"http://patchwork.ozlabs.org/comment/1765497/","msgid":"<alpine.DEB.2.20.1709081623140.16313@digraph.polyomino.org.uk>","list_archive_url":null,"date":"2017-09-08T16:24:27","subject":"Re: [PATCH 2/3] powerpc: Add redirection for finitef128, isinf128, \n\tand isnanf128","submitter":{"id":4349,"url":"http://patchwork.ozlabs.org/api/people/4349/","name":"Joseph Myers","email":"joseph@codesourcery.com"},"content":"On Fri, 8 Sep 2017, Gabriel F. T. Gomes wrote:\n\n> On top of that, math/math.h includes bits/mathcalls-helper-functions.h\n> (once for each floating-point type).  However, the declarations in\n> bits/mathcalls-helper-functions.h are macroized using __MATHDECL_1.\n> __MATHDECL_1 receives the suffix (f, l, f128, or nothing) as a parameter\n> and expands the base name (e.g.: __finite).\n> \n> When s_finite.c defines __finite as __redirect_finite, all declarations in\n> bits/mathcalls-helper-functions.h are also redefined.  That doesn't happen\n> with s_finitef.c because it only defines __finitef, which does not match\n> with anything in bits/mathcalls-helper-functions.h.\n\nI think that this key point - that the function name gets macro expanded \nbefore the concatenation - needs explaining in comments in all three \naffected source files to justify why they are defining the macros for \nother types.","headers":{"Return-Path":"<libc-alpha-return-84387-incoming=patchwork.ozlabs.org@sourceware.org>","X-Original-To":"incoming@patchwork.ozlabs.org","Delivered-To":["patchwork-incoming@bilbo.ozlabs.org","mailing list libc-alpha@sourceware.org"],"Authentication-Results":["ozlabs.org;\n\tspf=pass (mailfrom) smtp.mailfrom=sourceware.org\n\t(client-ip=209.132.180.131; helo=sourceware.org;\n\tenvelope-from=libc-alpha-return-84387-incoming=patchwork.ozlabs.org@sourceware.org;\n\treceiver=<UNKNOWN>)","ozlabs.org; dkim=pass (1024-bit key;\n\tsecure) header.d=sourceware.org header.i=@sourceware.org\n\theader.b=\"CSLZA3bF\"; dkim-atps=neutral","sourceware.org; auth=none"],"Received":["from sourceware.org (server1.sourceware.org [209.132.180.131])\n\t(using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256\n\tbits)) (No client certificate requested)\n\tby ozlabs.org (Postfix) with ESMTPS id 3xpjMl3nt1z9s7p\n\tfor <incoming@patchwork.ozlabs.org>;\n\tSat,  9 Sep 2017 02:24:51 +1000 (AEST)","(qmail 129364 invoked by alias); 8 Sep 2017 16:24:44 -0000","(qmail 129325 invoked by uid 89); 8 Sep 2017 16:24:38 -0000"],"DomainKey-Signature":"a=rsa-sha1; c=nofws; d=sourceware.org; h=list-id\n\t:list-unsubscribe:list-subscribe:list-archive:list-post\n\t:list-help:sender:date:from:to:cc:subject:in-reply-to:message-id\n\t:references:mime-version:content-type; q=dns; s=default; b=pNpJ+\n\tnc5O9rrA/VvCWikaeX+WbWUMD9KtsX/sbRHjLUTGl6IAgT7CB/S7TgBjfhj3j/Fy\n\tZ4yrlvp7bzfKv+Pd7wRRQNxsBn9u/nX/ZN1O4jTKrZlMdnquh4oIUNj6cZbp+Rqt\n\tF0Yvo7YyzJlSAUCaSd7wAiLK2U9SF0fIIU4Blg=","DKIM-Signature":"v=1; a=rsa-sha1; c=relaxed; d=sourceware.org; h=list-id\n\t:list-unsubscribe:list-subscribe:list-archive:list-post\n\t:list-help:sender:date:from:to:cc:subject:in-reply-to:message-id\n\t:references:mime-version:content-type; s=default; bh=C/UWky8KvRP\n\tVU416cAorf/gwmMs=; b=CSLZA3bFthxZMgEzmOwvjZy1qBEpfsIclOoiX/U9bpC\n\tixh4e+0mCngHaAKRF188W0823TkIam8dn99IVD2g5KAGjd8nZHHFbn+UDLtuOuwK\n\tYH/xwS1Cv/YfwlPwZo2Dq0PUqHAj1gCykH+8OaAIrrjNY8URhI5ek/YNSTAcbWCU\n\t=","Mailing-List":"contact libc-alpha-help@sourceware.org; run by ezmlm","Precedence":"bulk","List-Id":"<libc-alpha.sourceware.org>","List-Unsubscribe":"<mailto:libc-alpha-unsubscribe-incoming=patchwork.ozlabs.org@sourceware.org>","List-Subscribe":"<mailto:libc-alpha-subscribe@sourceware.org>","List-Archive":"<http://sourceware.org/ml/libc-alpha/>","List-Post":"<mailto:libc-alpha@sourceware.org>","List-Help":"<mailto:libc-alpha-help@sourceware.org>,\n\t<http://sourceware.org/ml/#faqs>","Sender":"libc-alpha-owner@sourceware.org","X-Virus-Found":"No","X-Spam-SWARE-Status":"No, score=-2.0 required=5.0 tests=AWL, BAYES_00,\n\tRCVD_IN_DNSWL_NONE, SPF_PASS,\n\tURIBL_RED autolearn=ham version=3.3.2 spammy=","X-HELO":"relay1.mentorg.com","Date":"Fri, 8 Sep 2017 16:24:27 +0000","From":"Joseph Myers <joseph@codesourcery.com>","To":"\"Gabriel F. T. Gomes\" <gabriel@inconstante.eti.br>","CC":"<libc-alpha@sourceware.org>","Subject":"Re: [PATCH 2/3] powerpc: Add redirection for finitef128, isinf128, \n\tand isnanf128","In-Reply-To":"<20170908122540.4ee0fffb@keller>","Message-ID":"<alpine.DEB.2.20.1709081623140.16313@digraph.polyomino.org.uk>","References":"<20170907104352.7748-1-gabriel@inconstante.eti.br>\n\t<20170907104352.7748-3-gabriel@inconstante.eti.br>\n\t<alpine.DEB.2.20.1709071437260.21759@digraph.polyomino.org.uk>\n\t<20170908122540.4ee0fffb@keller>","User-Agent":"Alpine 2.20 (DEB 67 2015-01-07)","MIME-Version":"1.0","Content-Type":"text/plain; charset=\"US-ASCII\"","X-ClientProxiedBy":"svr-ies-mbx-01.mgc.mentorg.com (139.181.222.1) To\n\tsvr-ies-mbx-01.mgc.mentorg.com (139.181.222.1)"}}]