From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (qmail 20755 invoked by alias); 28 Apr 2016 12:00:39 -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 19942 invoked by uid 89); 28 Apr 2016 12:00:38 -0000 Authentication-Results: sourceware.org; auth=none X-Virus-Found: No X-Spam-SWARE-Status: No, score=-2.7 required=5.0 tests=BAYES_00,FREEMAIL_FROM,KAM_MANYTO,RP_MATCHES_RCVD,SPF_PASS autolearn=ham version=3.3.2 spammy=H*u:38.4.0, consistently, H*UA:38.4.0, personal X-HELO: fencepost.gnu.org Received: from fencepost.gnu.org (HELO fencepost.gnu.org) (208.118.235.10) by sourceware.org (qpsmtpd/0.93/v0.84-503-g423c35a) with (AES128-SHA encrypted) ESMTPS; Thu, 28 Apr 2016 12:00:35 +0000 Received: from eggs.gnu.org ([2001:4830:134:3::10]:59917) by fencepost.gnu.org with esmtps (TLS1.0:RSA_AES_256_CBC_SHA1:256) (Exim 4.82) (envelope-from ) id 1avkcK-0006Hf-5o for gcc-patches@gnu.org; Thu, 28 Apr 2016 08:00:24 -0400 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1avkcE-0005QM-7V for gcc-patches@gnu.org; Thu, 28 Apr 2016 08:00:23 -0400 Received: from mail-lf0-x242.google.com ([2a00:1450:4010:c07::242]:33352) by eggs.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1avkcD-0005Q3-VN for gcc-patches@gnu.org; Thu, 28 Apr 2016 08:00:18 -0400 Received: by mail-lf0-x242.google.com with SMTP id p64so14612039lfg.0 for ; Thu, 28 Apr 2016 05:00:17 -0700 (PDT) X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20130820; h=x-gm-message-state:subject:to:references:from:message-id:date :user-agent:mime-version:in-reply-to:content-transfer-encoding; bh=9n5Iotj0u7T869xYxAURV+86HMnGZ7xnU8qKe4OZ55g=; b=SQKwlF/sKRzDX93mLc3bxVr8EnkdATEKuUYzR0oHpZxvnqhujlmOfTqcHwFB2tmCev 9ZDkPexWkjJTaue7ws5R86UKLScZV5V1HSMj7cZxQU2sad3f+mX+nuAP1uRA8u0bNRhn O0Pyl++stTCnGc4oBFWI4BQJ4L1qPDQekZZiwHVvPAwl24zLZW/b9jE+bIkTXCx+7Wxi Iz7NdBkP+AD8CmQrz/ykoNIrwh4SQH9hnZqtx3jyQuIQLoGKlosQVhBtX0sBaeyTtzso 20CHN1cz6WG9vIIsMCLXX+F4tTuRYn7C6/oefOxk+azc800f1MQUbRbHsLMd1hjFyrf/ Gwbg== X-Gm-Message-State: AOPr4FW+EOTrzoTs/FY7BxnbFoW15phi1L3wu/KNzWacolQj/45kpL5UsxT2JqLbGQSpMw== X-Received: by 10.25.212.6 with SMTP id l6mr6055412lfg.163.1461844816854; Thu, 28 Apr 2016 05:00:16 -0700 (PDT) Received: from ?IPv6:2a00:1148:b0ba:629:e23f:49ff:fe10:1e6b? ([2a00:1148:b0ba:629:e23f:49ff:fe10:1e6b]) by smtp.googlemail.com with ESMTPSA id f11sm1651554lfg.22.2016.04.28.05.00.15 (version=TLSv1/SSLv3 cipher=OTHER); Thu, 28 Apr 2016 05:00:15 -0700 (PDT) Subject: [C PATCH PING] PR43651: add warning for duplicate qualifier To: Martin Sebor , gcc-patches , Joseph Myers , Marek Polacek , David Malcolm , Jason Merrill References: <570241F0.3070705@gmail.com> <5707F068.3050601@gmail.com> <5708F58A.7090701@gmail.com> <570AB39C.1060002@gmail.com> From: Mikhail Maltsev Message-ID: <5721FB4F.5020208@gmail.com> Date: Thu, 28 Apr 2016 12:00:00 -0000 User-Agent: Mozilla/5.0 (X11; Linux x86_64; rv:38.0) Gecko/20100101 Icedove/38.4.0 MIME-Version: 1.0 In-Reply-To: <570AB39C.1060002@gmail.com> Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: 7bit X-detected-operating-system: by eggs.gnu.org: GNU/Linux 2.2.x-3.x [generic] X-Received-From: 2a00:1450:4010:c07::242 X-IsSubscribed: yes X-SW-Source: 2016-04/txt/msg01808.txt.bz2 On 04/10/2016 11:12 PM, Martin Sebor wrote: > On 04/09/2016 06:28 AM, Mikhail Maltsev wrote: >> On 04/08/2016 08:54 PM, Martin Sebor wrote: >>>> The name for new option "-Wduplicate-decl-specifier" and wording was >>>> chosen to match the same option in Clang. >>> >>> My version of Clang also warns in C++ mode but if I'm reading >>> the patch right, GCC would warn only C mode. I would find it >>> surprising if GCC provided the same option as Clang but didn't >>> make it available in the same languages. Do you have some >>> reason for leaving it out that I'm not thinking of? >> It is an error in C++ mode. Do we want to change this behavior? > > You're right, G++ does give an error. I missed it in my testing. > Unlike C11, C++ requires a diagnostic for duplicated cv-qualifiers > so by issuing a warning Clang is more permissive. My personal > inclination would be to treat this consistently between C and C++ > but whether or not to change it is something Jason would need to > weigh in on. Ping. -- Regards, Mikhail Maltsev