From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (qmail 16829 invoked by alias); 17 Oct 2014 20:47:08 -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 16814 invoked by uid 89); 17 Oct 2014 20:47:07 -0000 Authentication-Results: sourceware.org; auth=none X-Virus-Found: No X-Spam-SWARE-Status: No, score=-1.9 required=5.0 tests=AWL,BAYES_00 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; Fri, 17 Oct 2014 20:47:06 +0000 Received: from nat-ies.mentorg.com ([192.94.31.2] helo=SVR-IES-FEM-02.mgc.mentorg.com) by relay1.mentorg.com with esmtp id 1XfEQP-0002Db-OE from joseph_myers@mentor.com ; Fri, 17 Oct 2014 13:47:02 -0700 Received: from digraph.polyomino.org.uk (137.202.0.76) by SVR-IES-FEM-02.mgc.mentorg.com (137.202.0.106) with Microsoft SMTP Server id 14.3.181.6; Fri, 17 Oct 2014 21:47:00 +0100 Received: from jsm28 (helo=localhost) by digraph.polyomino.org.uk with local-esmtp (Exim 4.82) (envelope-from ) id 1XfEQN-0004vT-V8; Fri, 17 Oct 2014 20:47:00 +0000 Date: Fri, 17 Oct 2014 20:53:00 -0000 From: "Joseph S. Myers" To: =?ISO-8859-1?Q?Manuel_L=F3pez=2DIb=E1=F1ez?= CC: Gcc Patch List , Gerald Pfeifer Subject: Re: [PATCH doc] Explain options precedence and difference between -pedantic-errors and -Werror=pedantic In-Reply-To: Message-ID: References: MIME-Version: 1.0 Content-Type: multipart/mixed; boundary="-1152306461-1781010632-1413578819=:14369" X-SW-Source: 2014-10/txt/msg01790.txt.bz2 ---1152306461-1781010632-1413578819=:14369 Content-Type: text/plain; charset="ISO-8859-1" Content-Transfer-Encoding: QUOTED-PRINTABLE Content-length: 1615 On Fri, 17 Oct 2014, Manuel L=F3pez-Ib=E1=F1ez wrote: > +Some options, such as @option{-Wall} and @option{-Wextra}, turn on other > +options, such as @option{-Wunused}, which may turn on further options, > +such as @option{-Wunused-value}. The combined effect of positive and > +negative forms is that more specific options have priority over less > +specific ones, independently of their position in the command-line. For > +options of the same specificity, the last one takes effect. Options > +enabled or disabled via pragmas (@pxref{Diagnostic Pragmas}) take effect > +as if they appeared at the end of the command-line. This part is OK. > @@ -3318,8 +3327,8 @@ >=20 > @item -pedantic-errors > @opindex pedantic-errors > -Like @option{-Wpedantic}, except that errors are produced rather than > -warnings. > +This is equivalent to @option{-Werror=3Dpedantic} plus making into errors > +a few warnings that are not controlled by @option{-Wpedantic}. But I think the previous version is better here. Maybe at present your=20 version is true, but in principle -Wpedantic can control warnings that=20 aren't pedwarns. Some of the -Wformat warnings are conditional on having=20 both -Wformat and -Wpedantic enabled - we can only represent those using=20 OPT_Wformat in the warning calls at present, but there's at least as case=20 for -Werror=3Dpedantic to turn them into errors (while -pedantic-errors=20 definitely should not turn them into errors, as the code is only invalid=20 at runtime and is valid at compile time as long as it never gets=20 executed). --=20 Joseph S. Myers joseph@codesourcery.com= ---1152306461-1781010632-1413578819=:14369--