From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (qmail 30845 invoked by alias); 8 Sep 2019 09:38:12 -0000 Mailing-List: contact gcc-help@gcc.gnu.org; run by ezmlm Precedence: bulk List-Id: List-Archive: List-Post: List-Help: Sender: gcc-owner@gcc.gnu.org Received: (qmail 30833 invoked by uid 89); 8 Sep 2019 09:38:12 -0000 Authentication-Results: sourceware.org; auth=none X-Spam-SWARE-Status: No, score=-1.3 required=5.0 tests=AWL,BAYES_05,FOREIGN_BODY,FREEMAIL_FROM,RCVD_IN_DNSWL_NONE,SPF_HELO_PASS,SPF_PASS autolearn=no version=3.3.1 spammy=eine, cet, diese, wenn X-HELO: EUR02-VE1-obe.outbound.protection.outlook.com Received: from mail-oln040092069062.outbound.protection.outlook.com (HELO EUR02-VE1-obe.outbound.protection.outlook.com) (40.92.69.62) by sourceware.org (qpsmtpd/0.93/v0.84-503-g423c35a) with ESMTP; Sun, 08 Sep 2019 09:38:09 +0000 ARC-Seal: i=1; a=rsa-sha256; s=arcselector9901; d=microsoft.com; cv=none; b=oZGrvNHmMcC2qZMGtrZrikxuoqaETniJ1a7j4curuOwsh95GjAmoOoFPiYDspPUYhyfFali+MKtZlf3Exxu80pTfZqIJp2W0ZD/M/ynC18NAdEYnRS7iPFiyH6v1vWeRS1QKHG/0Ft5p6qZuxgoJEfk31VCNwNRYbGuP16Nq8cqYvHC8ATT8MQyy+eEycRmJflrIxFJEVOjUU96uj+vDc6E49AwgqAyTLMpT2MEnMFEyz1UZ0OY4UDQ1VYK0YI/n285OyRkbW/EX8lcys1ZyPyWRiU51jqcVafjgRjEpSqS4yuSnTNyoVg23eApe/fDWxF2aJweiR82aLSwDis3F3Q== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=microsoft.com; s=arcselector9901; h=From:Date:Subject:Message-ID:Content-Type:MIME-Version:X-MS-Exchange-SenderADCheck; bh=aDdvfba2EJbtTEin00bA4f9bNzj4GlAG67xO+vhv3TI=; b=h/X+SWY5JWxkdeAcBcNVpPNEEyX2hJ+zBUUequZAuJhwF5kyrN7MKD/SSUgmt+WGnWtApbw7wzb0sTKSy0E+1wkuhJ2KuLieafqgGT2r/GuqnVN+Y6UyOUrJ/zcrLbroAD9bMapGnbFcvq/9lDKqj3dAMaRsRR5RvmR+r73OFXSEB67en6G3WD9hVvUlX+Xd+e8CamgfmuaP/TBSnmfX+0DBviUrCr8ofoRinpUQl/0AEvpMVHpYaHBaphdas7cxDFzh6VzHh4QViYWppj+A6GhqfVT0ZLWZ30+aAYKLkaDn9qurWYEnpkx40MxGvX60zDcDKzGnseVuOceuYaHYmA== ARC-Authentication-Results: i=1; mx.microsoft.com 1; spf=none; dmarc=none; dkim=none; arc=none Received: from HE1EUR02FT064.eop-EUR02.prod.protection.outlook.com (10.152.10.58) by HE1EUR02HT046.eop-EUR02.prod.protection.outlook.com (10.152.10.221) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.20.2241.14; Sun, 8 Sep 2019 09:38:06 +0000 Received: from AM6PR10MB2566.EURPRD10.PROD.OUTLOOK.COM (10.152.10.56) by HE1EUR02FT064.mail.protection.outlook.com (10.152.11.88) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.20.2241.14 via Frontend Transport; Sun, 8 Sep 2019 09:38:06 +0000 Received: from AM6PR10MB2566.EURPRD10.PROD.OUTLOOK.COM ([fe80::2c65:b468:fdc0:d924]) by AM6PR10MB2566.EURPRD10.PROD.OUTLOOK.COM ([fe80::2c65:b468:fdc0:d924%6]) with mapi id 15.20.2241.018; Sun, 8 Sep 2019 09:38:06 +0000 From: Bernd Edlinger To: Joseph Myers , "gcc@gcc.gnu.org" Subject: Translated strings with sprintf %-directives Date: Sun, 08 Sep 2019 09:38:00 -0000 Message-ID: x-microsoft-original-message-id: <0e49cc9b-163a-19ad-b296-2c73313803a3@hotmail.de> x-ms-exchange-transport-forked: True Content-Type: text/plain; charset="Windows-1252" Content-ID: <96136B36AF014546B4A05EEBC9C85A76@EURPRD10.PROD.OUTLOOK.COM> Content-Transfer-Encoding: quoted-printable MIME-Version: 1.0 X-SW-Source: 2019-09/txt/msg00052.txt.bz2 Hi Joseph, I just noticed that translated strings might have different sprintf arguments than the original message: $ LANG=3Dde_DE.UTF-8 gcc -v --help|&grep shadow -Wintrinsic-shadow Warnen, wenn eine Benutzer-Prozedur denselben= Namen wie ein Intrinsic hat. -Wshadow-ivar Warnen, wenn eine lokale Deklaration von %qE = eine Instanzvariable verdeckt. -Wshadow Warnen, wenn eine Variable eine andere =FCber= deckt. Entspricht -Wshadow=3Dglobal. -Wshadow-compatible-local Identisch mit -Wshadow=3Dcompatible-local. Ve= rwenden Sie daher bitte diese Option. -Wshadow-local Identisch mit -Wshadow=3Dlocal. Verwenden Sie= daher bitte diese Option. -Wshadow=3Dcompatible-local Warnen, wenn eine lokale Variable eine ande= re lokale Variable oder einen Parameter mit gleichem Typ =FCberdeckt. -Wshadow=3Dglobal Warn when one variable shadows another (glo= bally). ist identisch mit -Wshadow. -Wshadow=3Dlocal Warnen, wenn eine lokale Variable eine ande= re lokale Variable oder einen Parameter =FCberdeckt. -fasan-shadow-offset=3D Spezifischen Offset f=FCr Schattenspeicher = verwenden. while $ LANG=3DC gcc -v --help|&grep shadow -Wintrinsic-shadow Warn if a user-procedure has the same name as= an intrinsic. -Wshadow-ivar Warn if a local declaration hides an instance= variable. -Wshadow Warn when one variable shadows another. Same= as -Wshadow=3Dglobal. -Wshadow-compatible-local Same as -Wshadow=3Dcompatible-local. Use the= latter option instead. -Wshadow-local Same as -Wshadow=3Dlocal. Use the latter opt= ion instead. -Wshadow=3Dcompatible-local Warn when one local variable shadows anothe= r local variable or parameter of compatible type. -Wshadow=3Dglobal Warn when one variable shadows another (glo= bally). Same as -Wshadow. -Wshadow=3Dlocal Warn when one local variable shadows anothe= r local variable or parameter. -mshstk Enable shadow stack built-in functions from C= ontrol-flow Enforcement Technology (CET). -fasan-shadow-offset=3D Use custom shadow memory offset. so the translated string value of -Wshadow-ivar has a sprintf format direct= ive, while the original string does not. In this case it is not used with with = sprintf so nothing happens with the string, but that is probably not always the cas= e. But I wonder if that would be a kind of a security concern otherwise. Shouldn't there be an automatic check that the %-directives are given in the original and the translated message are exactly the same? Bernd.