From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (qmail 99348 invoked by alias); 12 Dec 2017 17:05:01 -0000 Mailing-List: contact gcc-patches-help@gcc.gnu.org; run by ezmlm Precedence: bulk List-Id: List-Archive: List-Post: List-Help: Sender: gcc-patches-owner@gcc.gnu.org Received: (qmail 99121 invoked by uid 89); 12 Dec 2017 17:05:01 -0000 Authentication-Results: sourceware.org; auth=none X-Virus-Found: No X-Spam-SWARE-Status: No, score=-2.1 required=5.0 tests=AWL,BAYES_00,T_RP_MATCHES_RCVD autolearn=ham version=3.3.2 spammy= X-HELO: gate.crashing.org Received: from gate.crashing.org (HELO gate.crashing.org) (63.228.1.57) by sourceware.org (qpsmtpd/0.93/v0.84-503-g423c35a) with ESMTP; Tue, 12 Dec 2017 17:05:00 +0000 Received: from gate.crashing.org (localhost.localdomain [127.0.0.1]) by gate.crashing.org (8.14.1/8.14.1) with ESMTP id vBCH4u6e013170; Tue, 12 Dec 2017 11:04:57 -0600 Received: (from segher@localhost) by gate.crashing.org (8.14.1/8.14.1/Submit) id vBCH4uEZ013166; Tue, 12 Dec 2017 11:04:56 -0600 Date: Tue, 12 Dec 2017 17:05:00 -0000 From: Segher Boessenkool To: Michael Meissner , Martin Sebor , GCC Patches , David Edelsohn , Bill Schmidt Subject: Re: [PATCH] PR libgcc/83112, Fix warnings on libgcc float128-ifunc.c Message-ID: <20171212170455.GT10515@gate.crashing.org> References: <20171127192131.GA15914@ibm-tiger.the-meissners.org> <20171127234009.GA28990@ibm-tiger.the-meissners.org> <20171130024250.GX10515@gate.crashing.org> <20171130205425.GA11524@ibm-tiger.the-meissners.org> <20171201054022.GA5348@ibm-tiger.the-meissners.org> <20171201235355.GL10515@gate.crashing.org> <20171211205750.GA16210@ibm-tiger.the-meissners.org> Mime-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: <20171211205750.GA16210@ibm-tiger.the-meissners.org> User-Agent: Mutt/1.4.2.3i X-IsSubscribed: yes X-SW-Source: 2017-12/txt/msg00749.txt.bz2 On Mon, Dec 11, 2017 at 03:57:51PM -0500, Michael Meissner wrote: > > > +extern KCtype __divkc3 (KFtype, KFtype, KFtype, KFtype); > > > + > > > KCtype > > > __divkc3 (KFtype a, KFtype b, KFtype c, KFtype d) > > > { > > > > How does this warn? -Wmissing-declarations? Should this declaration be > > in a header then? > > The compiler creates the call to __mulkc3 and __divkc3, and internally it has > the appropriate prototype like it does for all built-in functions (in this > case, returning an _Float128 _Complex type, and taking 4 _Float128 arguments). > > So before adding ifunc support, we never noticed it didn't have a prototype, > because the compiler already has a prototype. I still don't get it. A function definition is also a declaration. Something very non-intuitive is happening? What does the patch change here? > With ifunc support, we now need to create two separate functions, __mulkc3_sw > and __mulkc3_hw, and make __multkc3 the ifunc resolver. > > So there really isn't an include file that is appropriate to put the > definitions in. I could change it to use the soft-fp includes (including > quadmath-float128.h) if desired. > > Did you want me to do that? I don't see the point in adding a second declaration right before the existing declaration (the function definition). I'm fine with what file it is in. > > A code comment explaining why you do a declaration for exactly the same > > thing as there is two lines later would help; otherwise people will try > > to delete it again :-) Segher