From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from mail-pf1-x435.google.com (mail-pf1-x435.google.com [IPv6:2607:f8b0:4864:20::435]) by sourceware.org (Postfix) with ESMTPS id 3DFAD3858D1E for ; Wed, 9 Feb 2022 18:43:53 +0000 (GMT) DMARC-Filter: OpenDMARC Filter v1.4.1 sourceware.org 3DFAD3858D1E Received: by mail-pf1-x435.google.com with SMTP id n23so5878007pfo.1 for ; Wed, 09 Feb 2022 10:43:53 -0800 (PST) X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20210112; h=x-gm-message-state:mime-version:references:in-reply-to:from:date :message-id:subject:to:cc; bh=vJaE1PO2JhS5ibRJ5Gs18qserI2TU1sowt3AqJ+8aZ8=; b=XKNzVDUAYr97llqnX8jdHYWRFeaEIII55fO/vFE42KgR9ZqaFc5oM4Bo3+HEl7/YFH zxpYapPk8IDS7W/+jN2XKZLguUYl9GKYUtw4LG7XPhftaywmHNUd3U7CtlkE9n3OE/Z5 DMedCytqwhexk5apgz2aEW3fZSuJV2wIMVHwEPxZ3yMboJeY1hynYlgX2IZNVa+NPwZ7 AdtHNUS7mN6AUkBWWAJVC91upD1e16D13F0iiGyuGWCA3IALxoSzr1KEnRbqKogNQpQ+ 8BAQvjXwjOQJB858WFCmNkuVCePX+AhFlRLlSf87+guQLxi0K3RyQVP3umLgq9xxmsRn I9tg== X-Gm-Message-State: AOAM530XsqxDzpuzBl7GQ9m969qPJDsPLv1r8YNxlXLdyc18l+We1bDz w9pRlu0TIUSqSbOiAt1y+HMXiXa9D0LNC4hyHwc= X-Google-Smtp-Source: ABdhPJxmUampXZxa9c26+VVWGD5vN4IZxtjYZwdFvUAvRdEm26UowRDbXdthL/vzcQXjDvLNUgFjP3mM+XSBhO2GBjQ= X-Received: by 2002:a05:6a00:2490:: with SMTP id c16mr3690790pfv.67.1644432232170; Wed, 09 Feb 2022 10:43:52 -0800 (PST) MIME-Version: 1.0 References: <20220209165921.GN614@gate.crashing.org> In-Reply-To: <20220209165921.GN614@gate.crashing.org> From: Krishna Narayanan Date: Thu, 10 Feb 2022 00:13:40 +0530 Message-ID: Subject: Re: Extended doubt regarding the bug 93432 To: Segher Boessenkool Cc: Jonathan Wakely , gcc-help X-Spam-Status: No, score=0.9 required=5.0 tests=BAYES_00, DKIM_SIGNED, DKIM_VALID, DKIM_VALID_AU, DKIM_VALID_EF, FREEMAIL_ENVFROM_END_DIGIT, FREEMAIL_FROM, HTML_MESSAGE, KAM_NUMSUBJECT, RCVD_IN_DNSWL_NONE, SPF_HELO_NONE, SPF_PASS, TXREP, T_SCC_BODY_TEXT_LINE autolearn=no autolearn_force=no version=3.4.4 X-Spam-Checker-Version: SpamAssassin 3.4.4 (2020-01-24) on server2.sourceware.org Content-Type: text/plain; charset="UTF-8" X-Content-Filtered-By: Mailman/MimeDel 2.1.29 X-BeenThere: gcc-help@gcc.gnu.org X-Mailman-Version: 2.1.29 Precedence: list List-Id: Gcc-help mailing list List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Wed, 09 Feb 2022 18:43:54 -0000 Noted with thanks. Krishna Narayanan On Wed, Feb 9, 2022 at 10:31 PM Segher Boessenkool < segher@kernel.crashing.org> wrote: > On Tue, Feb 08, 2022 at 05:37:12PM +0000, Jonathan Wakely via Gcc-help > wrote: > > It warns with -O1, which is the documented behaviour: > > > > The effectiveness of some warnings depends on optimizations also > > being enabled. For example -Wsuggest-final-types is more > > effective with link-time optimization and -Wmaybe-uninitialized > does > > not warn at all unless optimization is enabled. > > > > So no, I don't think it' a bug. GCC is behaving as designed. Ideally it > > would be better at warning without optimization, but changing that would > be > > hard. > > GCC does not execute most of its code at -O0. This is important for > speed of course, but much more importantly it also allows us to use -O0 > when other optimisation levels crash or generate wrong code. This is > useful for the compiler developers of course, but it also is an > important workaround for users, when bad things happen. > > > Segher >