From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (qmail 5330 invoked by alias); 10 Jun 2015 10:17:50 -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 5318 invoked by uid 89); 10 Jun 2015 10:17:49 -0000 Authentication-Results: sourceware.org; auth=none X-Virus-Found: No X-Spam-SWARE-Status: No, score=-2.3 required=5.0 tests=AWL,BAYES_00,RCVD_IN_DNSWL_LOW,SPF_PASS autolearn=ham version=3.3.2 X-HELO: relay1.mentorg.com Received: from relay1.mentorg.com (HELO relay1.mentorg.com) (192.94.38.131) by sourceware.org (qpsmtpd/0.93/v0.84-503-g423c35a) with ESMTP; Wed, 10 Jun 2015 10:17:48 +0000 Received: from nat-ies.mentorg.com ([192.94.31.2] helo=SVR-IES-FEM-01.mgc.mentorg.com) by relay1.mentorg.com with esmtp id 1Z2d4q-0003Q1-QL from joseph_myers@mentor.com ; Wed, 10 Jun 2015 03:17:45 -0700 Received: from digraph.polyomino.org.uk (137.202.0.76) by SVR-IES-FEM-01.mgc.mentorg.com (137.202.0.104) with Microsoft SMTP Server id 14.3.224.2; Wed, 10 Jun 2015 11:17:43 +0100 Received: from jsm28 (helo=localhost) by digraph.polyomino.org.uk with local-esmtp (Exim 4.82) (envelope-from ) id 1Z2d4o-0000g2-0k; Wed, 10 Jun 2015 10:17:42 +0000 Date: Wed, 10 Jun 2015 10:44:00 -0000 From: Joseph Myers To: weixiangyu CC: James Greenhalgh , "gcc-patches@gcc.gnu.org" , Marcus Shawcroft , Richard Earnshaw , Richard Earnshaw Subject: RE: backport the fixes of PR target/64011 and /61749 to 4.9 gcc In-Reply-To: <894B9D8AA7173E40BFFBBF195B8281BCB76A18@SZXEMI503-MBX.china.huawei.com> Message-ID: References: <894B9D8AA7173E40BFFBBF195B8281BCB75B4B@SZXEMI503-MBX.china.huawei.com> <20150528135737.GA3964@arm.com> <894B9D8AA7173E40BFFBBF195B8281BCB76A18@SZXEMI503-MBX.china.huawei.com> User-Agent: Alpine 2.10 (DEB 1266 2009-07-14) MIME-Version: 1.0 Content-Type: text/plain; charset="US-ASCII" X-SW-Source: 2015-06/txt/msg00742.txt.bz2 On Wed, 10 Jun 2015, weixiangyu wrote: > + if (bitsize + bitnum > unit && bitnum < unit) > + { > + warning (OPT_Wextra, "write of "HOST_WIDE_INT_PRINT_UNSIGNED"bit data " > + "outside the bound of destination object, data truncated into " > + HOST_WIDE_INT_PRINT_UNSIGNED"bit", bitsize, unit - bitnum); HOST_WIDE_INT_PRINT_UNSIGNED is a printf format, which depends on the host and is not suitable for any translatable string, not a format for GCC's pretty printers. Use %wu instead in any call to a GCC diagnostic function. Mainline appears to have this correct. -- Joseph S. Myers joseph@codesourcery.com