From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (qmail 6549 invoked by alias); 1 Jun 2017 13:23:41 -0000 Mailing-List: contact libc-alpha-help@sourceware.org; run by ezmlm Precedence: bulk List-Id: List-Subscribe: List-Archive: List-Post: List-Help: , Sender: libc-alpha-owner@sourceware.org Received: (qmail 6459 invoked by uid 89); 1 Jun 2017 13:23:40 -0000 Authentication-Results: sourceware.org; auth=none X-Virus-Found: No X-Spam-SWARE-Status: No, score=-1.9 required=5.0 tests=AWL,BAYES_00,RCVD_IN_DNSWL_NONE,SPF_PASS,URIBL_RED autolearn=ham version=3.3.2 spammy=Hx-languages-length:1626 X-HELO: relay1.mentorg.com Date: Thu, 01 Jun 2017 13:23:00 -0000 From: Joseph Myers To: "Gabriel F. T. Gomes" CC: Subject: Re: [PATCH 2/6] float128: Add conversion from float128 to mpn In-Reply-To: <20170529233114.249cee23@keller.br.ibm.com> Message-ID: References: <1495803396-14558-1-git-send-email-gftg@linux.vnet.ibm.com> <1495803396-14558-3-git-send-email-gftg@linux.vnet.ibm.com> <20170529233114.249cee23@keller.br.ibm.com> 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 SVR-IES-MBX-04.mgc.mentorg.com (139.181.222.4) X-SW-Source: 2017-06/txt/msg00022.txt.bz2 On Mon, 29 May 2017, Gabriel F. T. Gomes wrote: > The file sysdeps/ieee754/ldbl-128/ldbl2mpn.c includes stdlib/gmp-impl.h, > which defines MAX and MIN. With the changes to ldbl2mpn.c, the inclusion > of float128_private.h will indirectly include sys/param.h, redefining the > macros. > > I attached a new patch which replaces the definition of MAX and MIN in > stdlib/gmp-impl.h with an inclusion of sys/param.h. > > Is the attached patch OK for master? That patch is OK. > > > +#define __FLOAT128_OVERRIDE > > > + > > > +#include "../ldbl-128/ldbl2mpn.c" > > > > Is there a reason you need a sepcial __FLOAT128_OVERRIDE macro, instead of > > the approach used by the other float128 files of including > > , which defines all relevant macros (e.g. defining > > __mpn_extract_long_double to __mpn_extract_float128, and with the > > __mpn_extract_long_double definition using _Float128 as the type name and > > letting math_ldbl.h redefine that back to long double as needed)? > > I could not use the same approach, because ldbl2mpn.c includes the header > include/gmp.h, which declares both __mpn_extract_long_double and > __mpn_extract_float128. I would end up declaring __mpn_extract_float128 > twice. This sounds like an include ordering problem. float128_private.h redefines lots of names from math_private.h and math.h. But that doesn't cause problems because it includes those headers first. So how about making float128_private.h include gmp.h before redefining __mpn_extract_long_double? -- Joseph S. Myers joseph@codesourcery.com