From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (qmail 8366 invoked by alias); 28 Apr 2002 17:59:39 -0000 Mailing-List: contact gcc-help@gcc.gnu.org; run by ezmlm Precedence: bulk List-Archive: List-Post: List-Help: Sender: gcc-owner@gcc.gnu.org Received: (qmail 8338 invoked from network); 28 Apr 2002 17:59:38 -0000 Received: from unknown (HELO gandalf.codesourcery.com) (66.60.148.227) by sources.redhat.com with SMTP; 28 Apr 2002 17:59:38 -0000 Received: from gandalf.codesourcery.com (localhost.localdomain [127.0.0.1]) by gandalf.codesourcery.com (8.11.6/8.11.6) with ESMTP id g3SHuWL15406; Sun, 28 Apr 2002 10:56:32 -0700 Date: Sun, 28 Apr 2002 11:59:00 -0000 From: Mark Mitchell To: Franz Sirl , Jason Merrill cc: "gcc-patches@gcc.gnu.org" , Richard Henderson , Alan Modra , "gcc@gcc.gnu.org" Subject: Re: [PATCH] Fix PR c/6343 (was: Re: GCC 3.1 Prerelease) Message-ID: <230220000.1020016592@gandalf.codesourcery.com> In-Reply-To: <200204281640.27693@enzo.bigblue.local> References: <5.1.1.2.2.20020423130143.04a21008@mail.lauterbach.com> <200204252121.58902@enzo.bigblue.local> <200204281640.27693@enzo.bigblue.local> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii; format=flowed Content-Transfer-Encoding: 7bit Content-Disposition: inline X-SW-Source: 2002-04/txt/msg01509.txt.bz2 + if ((! DECL_WEAK (newdecl) && ! DECL_WEAK (olddecl)) + || (DECL_WEAK (newdecl) && DECL_WEAK (olddecl))) + return; + Just: if (DECL_WEAK (newdecl) == DECL_WEAK (olddecl)) return; seems easier to read to me. + warning_with_decl (decl, "applying #pragma weak `%s' after first use may result in unspecified behaviour"); + Just say "results in unspecified behavior" or even "is invalid". There's no reason to be so cautious; either the construct is legal or it isn't. OK for mainline and branch with these changes. Thanks for working so hard on this! -- Mark Mitchell mark@codesourcery.com CodeSourcery, LLC http://www.codesourcery.com