From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (qmail 27377 invoked by alias); 10 Aug 2016 15:29:43 -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 27366 invoked by uid 89); 10 Aug 2016 15:29:42 -0000 Authentication-Results: sourceware.org; auth=none X-Virus-Found: No X-Spam-SWARE-Status: No, score=-2.0 required=5.0 tests=AWL,BAYES_00,FREEMAIL_FROM,RCVD_IN_DNSWL_LOW,SPF_PASS autolearn=ham version=3.3.2 spammy=trapped, H*r:192.168.10 X-HELO: mail-wm0-f68.google.com Received: from mail-wm0-f68.google.com (HELO mail-wm0-f68.google.com) (74.125.82.68) by sourceware.org (qpsmtpd/0.93/v0.84-503-g423c35a) with (AES128-GCM-SHA256 encrypted) ESMTPS; Wed, 10 Aug 2016 15:29:41 +0000 Received: by mail-wm0-f68.google.com with SMTP id o80so10265896wme.0 for ; Wed, 10 Aug 2016 08:29:41 -0700 (PDT) X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20130820; h=x-gm-message-state:sender:subject:to:references:cc:from:message-id :date:user-agent:mime-version:in-reply-to:content-transfer-encoding; bh=stkT+1vx2cYYoAgtGPAhVMLBzuiBVC4tbJZdNUqTUX8=; b=iV/dyg3hjiWhuU19Rw5fy+7dlhIf2VznVD4oqBZH5C9LgYBTqiCufsGucBsDfrtw3X dMIxXCj/TW+q5gOq/yQW2gSk/WH6PYGZknmSZA/QPxLCQt8G5Phk5pQBkxBO3I/igP5w eKJ/uvloJ9uje3QpQbDjP/BjCucCETV8SS2ucKYDRXx5y6KdxzjAvemk29fYrBwAtFd+ M8yk/XFak12+XVCSmcsGtUGBb1w7k9C6apNlSUJ9moEIrnl4fIUEQX7EdmTFrLLd8w78 Gq/DEQihJAUtBiUhqnCxk2b5qgv4AJfCpPoBT0XvUrTkpSA04XHqNeROSn8Aj+dwSOqP JWPw== X-Gm-Message-State: AEkoouuTlixsG8Hz5xCET9g13o7MFOeLbAJUlYShgbbRhyzRl2BhXFEGNsQdS5pX4v96bg== X-Received: by 10.194.118.132 with SMTP id km4mr4597795wjb.158.1470842978465; Wed, 10 Aug 2016 08:29:38 -0700 (PDT) Received: from [192.168.10.165] (94-39-152-88.adsl-ull.clienti.tiscali.it. [94.39.152.88]) by smtp.googlemail.com with ESMTPSA id p1sm43556163wjd.37.2016.08.10.08.29.37 (version=TLS1_2 cipher=ECDHE-RSA-AES128-GCM-SHA256 bits=128/128); Wed, 10 Aug 2016 08:29:37 -0700 (PDT) Subject: Re: [PATCH v2] cpp/c: Add -Wexpansion-to-defined To: =?UTF-8?B?TWFudWVsIEzDs3Blei1JYsOhw7Fleg==?= References: <1470823595-1471-1-git-send-email-bonzini@gnu.org> <59051c81-0056-3e01-54a6-07b71307965c@gnu.org> Cc: Gcc Patch List , "Joseph S. Myers" From: Paolo Bonzini Message-ID: Date: Wed, 10 Aug 2016 15:29:00 -0000 User-Agent: Mozilla/5.0 (X11; Linux x86_64; rv:45.0) Gecko/20100101 Thunderbird/45.2.0 MIME-Version: 1.0 In-Reply-To: Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: 8bit X-SW-Source: 2016-08/txt/msg00831.txt.bz2 On 10/08/2016 17:24, Manuel López-Ibáñez wrote: > Perhaps we need something like -Wextra-pedantic, for things that are > undefined by ISO C but defined by GNU. Thus, they would not trigger > pedwarns and no error with -pedantic-errors. I think this is overengineering it a bit. If they are annoying, put them in -Wpedantic; if they aren't too bad, put them in Wextra. There is also the case (which includes -Wshift-negative-value) of things that are undefined by ISO C and trapped by ubsan, but defined by GNU C. Actually are pedwarns even necessary nowadays? In theory they fall in two categories: - stuff that is EnabledBy(Wpedantic) automatically gets bumped from warning to error by -pedantic-errors or (I think) -Werror=pedantic; - stuff that is not enabled by anything should use OPT_Wpedantic, and then warning(OPT_Wpedantic) should have the same effect as pedwarn(OPT_Wpedantic). Are there other cases that I'm missing? Paolo