From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from lists.gentoo.org (pigeon.gentoo.org [208.92.234.80]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by finch.gentoo.org (Postfix) with ESMTPS id 34F0E138334 for ; Thu, 13 Sep 2018 23:21:38 +0000 (UTC) Received: from pigeon.gentoo.org (localhost [127.0.0.1]) by pigeon.gentoo.org (Postfix) with SMTP id D6CDEE0D1F; Thu, 13 Sep 2018 23:21:34 +0000 (UTC) Received: from smtp.gentoo.org (smtp.gentoo.org [140.211.166.183]) (using TLSv1.2 with cipher ECDHE-RSA-AES128-GCM-SHA256 (128/128 bits)) (No client certificate requested) by pigeon.gentoo.org (Postfix) with ESMTPS id 7FDF2E0BC2 for ; Thu, 13 Sep 2018 23:21:34 +0000 (UTC) Received: from mail-it0-f46.google.com (mail-it0-f46.google.com [209.85.214.46]) (using TLSv1.2 with cipher ECDHE-RSA-AES128-GCM-SHA256 (128/128 bits)) (No client certificate requested) (Authenticated sender: mattst88) by smtp.gentoo.org (Postfix) with ESMTPSA id DD5C9335D09 for ; Thu, 13 Sep 2018 23:21:32 +0000 (UTC) Received: by mail-it0-f46.google.com with SMTP id d10-v6so256259itj.5 for ; Thu, 13 Sep 2018 16:21:32 -0700 (PDT) X-Gm-Message-State: APzg51Bkie2tJbztwanRrZ6UbIYwx+GrBzmyZ7EsniFLjQx3cMvLlwf7 4zl73niQ6tlRWUqOM4I9+T5hrbwtIaHUP9FemyI= X-Google-Smtp-Source: ANB0Vdbdk2Qsww/1wBBLu+xpWOh5V/aGDmYsU5KCqvPi2cnArXMZvcYVD0+wbpfa3grd+hk+3Eh7OESkbya7x/lqW1w= X-Received: by 2002:a24:c984:: with SMTP id h126-v6mr269212itg.33.1536880890882; Thu, 13 Sep 2018 16:21:30 -0700 (PDT) Precedence: bulk List-Post: List-Help: List-Unsubscribe: List-Subscribe: List-Id: Gentoo Linux mail X-BeenThere: gentoo-dev@lists.gentoo.org Reply-to: gentoo-dev@lists.gentoo.org MIME-Version: 1.0 References: <20180909143221.21d784d02f51623e8c57c545@gentoo.org> <1536510660.863.9.camel@gentoo.org> <20180910074539.GA6512@baraddur.perfinion.com> <0d8b7f02-9c38-969c-413b-69d4dee6ca89@gentoo.org> <20180912085649.GA16516@baraddur.perfinion.com> <6c18c6bd-4cf3-dff6-2f20-c021063e01fa@gentoo.org> <20180913160347.GC26329@gentoo.org> <4FCF42AC-6B48-40F6-8B98-79CF71789A6A@gentoo.org> In-Reply-To: <4FCF42AC-6B48-40F6-8B98-79CF71789A6A@gentoo.org> From: Matt Turner Date: Thu, 13 Sep 2018 16:21:18 -0700 X-Gmail-Original-Message-ID: Message-ID: Subject: Re: [gentoo-dev] Changing policy about -Werror To: gentoo development Content-Type: text/plain; charset="UTF-8" Content-Transfer-Encoding: quoted-printable X-Archives-Salt: 98b6d2f9-34ab-488b-b40f-c6b232c4ced4 X-Archives-Hash: 47950869fc4f79becfe6acdeae0959dc On Thu, Sep 13, 2018 at 4:13 PM Richard Yao wrote: > > On Sep 13, 2018, at 12:03 PM, Fabian Groffen wrote= : > > > >> On 13-09-2018 07:36:09 -0400, Richard Yao wrote: > >> > >> > >>>> On Sep 12, 2018, at 6:55 PM, Thomas Deutschmann = wrote: > >>>> > >>>> On 2018-09-12 16:50, Rich Freeman wrote: > >>>> There is also the case where we want these warnings to block > >>>> installation, because the risk of there being a problem is too great= . > >>> > >>> I really disagree with that. So many devs have already said multiple > >>> times in this thread that "-Werror" is only turning existing warnings > >>> into fatal errors but "-Werror" itself doesn't add any new checks and > >>> more often requires "-O3" to be useful. > >> The way that compilers work is that the warnings are generated in the = front end while the optimization level affects the backend. That means that= -O3 has no effect on the code that does error generation. This remark abou= t -O3 being needed to make -Werror useful is just plain wrong. > > > > Huh? -O3 enables more checks, which can generate more warnings. > > What checks are those? -O3 affects backend optimization while warnings ar= e generated by the front end. Once the immediate representation is generate= d, there are no other warnings aside from those from the linker. https://gcc.gnu.org/onlinedocs/gcc/Warning-Options.html Search for "depend on" -> [...] estimated based on heuristics that depend on thelevel argument and on optimization -> Because these warnings depend on optimization [...] Yes, warnings are dependent on optimization level.