From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from esa2.mentor.iphmx.com (esa2.mentor.iphmx.com [68.232.141.98]) by sourceware.org (Postfix) with ESMTPS id ACD2B3858C27 for ; Wed, 27 Oct 2021 22:13:19 +0000 (GMT) DMARC-Filter: OpenDMARC Filter v1.4.1 sourceware.org ACD2B3858C27 Authentication-Results: sourceware.org; dmarc=none (p=none dis=none) header.from=codesourcery.com Authentication-Results: sourceware.org; spf=pass smtp.mailfrom=mentor.com IronPort-SDR: u1yKXo6A4BLtGHcLJgroz/SYSnOwQ1Eu3HfZRn4yZtgqshWBrrwgCGwRhJoc0ctcrLKmYbH0Cu U0Ri/tEtYKk2YjYuWFen6/M3F46VPRla/nNmvA1bllVISs69Pex/5Onr4CcJCXWX/mpfAdGGdo bTiiv+sacZpLcIGuUonvv6pEa4SbZHahDPm6YzH04VIVQ5mKwmOmJQmFwjgYwxQt688Fm9Oj9s 6cZllqkgZtzbdsKKSubgC/enXp4jX1uEfEAjdDkbh4gcZXuD054/FONq4322ThU84dS6anJfrq 5tOfcaQAyrd0YBSnIVq7scb/ X-IronPort-AV: E=Sophos;i="5.87,188,1631606400"; d="scan'208";a="67719603" Received: from orw-gwy-01-in.mentorg.com ([192.94.38.165]) by esa2.mentor.iphmx.com with ESMTP; 27 Oct 2021 14:13:18 -0800 IronPort-SDR: yUsFlG5XvtJPf2OanPvXS9MFM82a1Ur+/aFVQhowWw+f0OVLYQcr220tJ9nFpUT3ickiX1X7cu usQY71GI0epYBpy879eBdU+ytol2+agH4t5UP/WJnNfHdHOjexiXynlUKKddGlrJFXnIBfi6W9 BKTNxkp2zZ3tI6hAx1ePbYXg1mu81MvR7HZ+3rJk/1v7Qe+zsSs1timtmBMQyuTYa6ecOApQnt Ojk6bz0eSevlTNh/rvQzZZJsSSPB1lX/7l0weWQjcr5EPtPfuNSM1lAxlu+D+1v/OhEiMW2SFe mns= Date: Wed, 27 Oct 2021 22:13:14 +0000 From: Joseph Myers X-X-Sender: jsm28@digraph.polyomino.org.uk To: Stafford Horne CC: GLIBC patches Subject: Re: Upstreaming OpenRISC with GCC mainline In-Reply-To: Message-ID: References: User-Agent: Alpine 2.22 (DEB 394 2020-01-19) MIME-Version: 1.0 Content-Type: text/plain; charset="US-ASCII" X-Originating-IP: [137.202.0.90] X-ClientProxiedBy: SVR-IES-MBX-07.mgc.mentorg.com (139.181.222.7) To svr-ies-mbx-01.mgc.mentorg.com (139.181.222.1) X-Spam-Status: No, score=-3117.3 required=5.0 tests=BAYES_00, HEADER_FROM_DIFFERENT_DOMAINS, KAM_DMARC_STATUS, SPF_HELO_PASS, SPF_PASS, TXREP autolearn=no autolearn_force=no version=3.4.4 X-Spam-Checker-Version: SpamAssassin 3.4.4 (2020-01-24) on server2.sourceware.org X-BeenThere: libc-alpha@sourceware.org X-Mailman-Version: 2.1.29 Precedence: list List-Id: Libc-alpha mailing list List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Wed, 27 Oct 2021 22:13:21 -0000 On Thu, 28 Oct 2021, Stafford Horne via Libc-alpha wrote: > The question now being, how should I go about upstreaming? Should I > just backport my gcc patches to gcc-11 and move forward? Or should I > work to fixup all of the GCC mainline issues the correct way? I think > the second option may take quite some time though. What are you doing differently in your GCC or glibc ports that results in getting these warnings for OpenRISC but not for other architectures? That's a key thing to understand, separately for each issue (for example, S/390 sometimes has problems with warnings not seen on other architectures because it sets various tuning parameters differently). In some cases, it might be that GCC *should* warn for other architectures, in which case an upstream GCC bug needs reporting about the missing warning. For example, I can see no good reason for the "'strcmp' argument 2 declared attribute 'nonstring'" warnings you quote to depend on the architecture; they should appear on all architectures or none. Then, if a warning is a false positive (and really is still present with current GCC mainline), adding an initialization is not normally the appropriate fix; rather, for uninitialized warnings we use DIAG_* to suppress them, with a comment explaining the analysis of *why* the warning is a false positive. For example, in sysdeps/ieee754/flt-32/s_log1pf.c we already have a use of those macros for what looks like the specific warning case you quote; if, despite that, you see the warning for a different place in the same file for the same variable, it might be reasonable to repeat the same macro calls and comment there, if the same analysis applies. -- Joseph S. Myers joseph@codesourcery.com