From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: X-Spam-Checker-Version: SpamAssassin 3.4.2 (2018-09-13) on dcvr.yhbt.net X-Spam-Level: X-Spam-ASN: AS22989 209.51.188.0/24 X-Spam-Status: No, score=-3.7 required=3.0 tests=AWL,BAYES_00,DKIM_INVALID, DKIM_SIGNED,HEADER_FROM_DIFFERENT_DOMAINS,MAILING_LIST_MULTI, RCVD_IN_DNSWL_MED,RCVD_IN_MSPIKE_H2,SPF_HELO_PASS,SPF_PASS shortcircuit=no autolearn=ham autolearn_force=no version=3.4.2 Received: from lists.gnu.org (lists.gnu.org [209.51.188.17]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by dcvr.yhbt.net (Postfix) with ESMTPS id 18B721F8C8 for ; Wed, 8 Sep 2021 14:59:50 +0000 (UTC) Received: from localhost ([::1]:56650 helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1mNz3E-0002LH-U3 for normalperson@yhbt.net; Wed, 08 Sep 2021 10:59:48 -0400 Received: from eggs.gnu.org ([2001:470:142:3::10]:53472) by lists.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1mNz3B-0002Ja-2G for bug-gnulib@gnu.org; Wed, 08 Sep 2021 10:59:45 -0400 Received: from mo4-p00-ob.smtp.rzone.de ([81.169.146.161]:26401) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1mNz39-00077l-7k for bug-gnulib@gnu.org; Wed, 08 Sep 2021 10:59:44 -0400 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; t=1631113168; s=strato-dkim-0002; d=clisp.org; h=References:In-Reply-To:Message-ID:Date:Subject:Cc:To:From:Cc:Date: From:Subject:Sender; bh=hvRNelQ1Y0T3rx0ccPGISaVNuwj8vL6+CXgjsrjTVWs=; b=bIXkErixMS9CBwKnFb3pFWy8jY8BxKCyLe9EQGiluXAZrqbEn/BfNcO+yQWaHYSCzq g2W/XN3v5+Mb4h/+PmA9i5oIpOjf8OdC1S1Ki/YJVB1PXMe7i/5MV0r7ZzuldEUbwI+6 D8QrZcm4k5WA0q8Pt+/3JNGM/O0YbN4Nt1p+i5+Ar8aqkGPngu9VTE+nrb3EwnqYWUxb TJH8h85i+fMfSHkVR6LToQQjaCaU+85MoUHshNPHbqBenYxVUSTC2rMb49TJB9PeHy/K peF2Q8zNPqYHqz4G+41E8Cb03Llop+LkR0HlDUAyaS/x4D/c+6ElaCf7+qZNqW/e0Jfl z6/g== Authentication-Results: strato.com; dkim=none X-RZG-AUTH: ":Ln4Re0+Ic/6oZXR1YgKryK8brlshOcZlIWs+iCP5vnk6shH0WWb0LN8XZoH94z26ll5ip69owxEf1wz0BgQYe1Ufo32CKDn9DQ==" X-RZG-CLASS-ID: mo00 Received: from omega.localnet by smtp.strato.de (RZmta 47.33.1 AUTH) with ESMTPSA id c0304dx88ExSSm3 (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256 bits)) (Client did not present a certificate); Wed, 8 Sep 2021 16:59:28 +0200 (CEST) From: Bruno Haible To: bug-gnulib@gnu.org, Paul Eggert Subject: Re: [PATCH] declare free() in lib/free.c Date: Wed, 08 Sep 2021 16:59:27 +0200 Message-ID: <3548000.Y4W8hZkJsM@omega> In-Reply-To: References: MIME-Version: 1.0 Content-Transfer-Encoding: quoted-printable Content-Type: text/plain; charset="UTF-8" Received-SPF: none client-ip=81.169.146.161; envelope-from=bruno@clisp.org; helo=mo4-p00-ob.smtp.rzone.de X-Spam_score_int: -27 X-Spam_score: -2.8 X-Spam_bar: -- X-Spam_report: (-2.8 / 5.0 requ) BAYES_00=-1.9, DKIM_SIGNED=0.1, DKIM_VALID=-0.1, DKIM_VALID_AU=-0.1, DKIM_VALID_EF=-0.1, RCVD_IN_DNSWL_LOW=-0.7, RCVD_IN_MSPIKE_H3=0.001, RCVD_IN_MSPIKE_WL=0.001, SPF_HELO_PASS=-0.001, SPF_NONE=0.001 autolearn=ham autolearn_force=no X-Spam_action: no action X-BeenThere: bug-gnulib@gnu.org X-Mailman-Version: 2.1.23 Precedence: list List-Id: Gnulib discussion list List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Cc: Lucy Phipps Errors-To: bug-gnulib-bounces+normalperson=yhbt.net@gnu.org Sender: "bug-gnulib" Hi, > @@ -27,9 +27,11 @@ >=20 > # include >=20 > +# undef free > +void free (void *); > + > void > rpl_free (void *p) > -# undef free > { > # if defined __GNUC__ && !defined __clang__ > /* An invalid GCC optimization >=20 >=20 Moving the '#undef' line up-front is generally not right: it makes it impossible for a library, say 'libfoo', to be namespace-clean by defining #define free libfoo_free If there is an implicit declaration warning, it should be fixed by including the specification header for that function. The specification header for the 'free' function is =E2=80=94 which is already inc= luded at the top of free.c. What exactly is the problem that you were seeing? (Commands to reproduce, and compiler output, please.) Bruno