From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: by sourceware.org (Postfix, from userid 48) id 4598D3858284; Mon, 10 Oct 2022 14:34:08 +0000 (GMT) DKIM-Filter: OpenDKIM Filter v2.11.0 sourceware.org 4598D3858284 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gcc.gnu.org; s=default; t=1665412448; bh=++Itn9ySyR4Ic2NJAjh5JhVDFd7Jrdx1Wx3sm+1SxhA=; h=From:To:Subject:Date:In-Reply-To:References:From; b=yb9yFeapDPtuNfmdOV2+Tl6HA1ZFgCDrXs+A9F+YpORFkqeOo9OWEivMibK857CLj QC4/hK5y+JIYmbuIdakreO2tkEmSQ9LcwdWrLpatZ603A1xA8uo9xLlFe153E0QHwP imqOxSvhkG+KP3eSiOO6eZQrwwTIA0SdgELhFUes= From: "lhyatt at gcc dot gnu.org" To: gcc-bugs@gcc.gnu.org Subject: [Bug c/89549] [10/11/12/13 Regression] -Wmisleading-indentation is disabled from this point onwards, since column-tracking was disabled due to the size of the code/headers Date: Mon, 10 Oct 2022 14:34:07 +0000 X-Bugzilla-Reason: CC X-Bugzilla-Type: changed X-Bugzilla-Watch-Reason: None X-Bugzilla-Product: gcc X-Bugzilla-Component: c X-Bugzilla-Version: 9.0 X-Bugzilla-Keywords: diagnostic X-Bugzilla-Severity: normal X-Bugzilla-Who: lhyatt at gcc dot gnu.org X-Bugzilla-Status: NEW X-Bugzilla-Resolution: X-Bugzilla-Priority: P2 X-Bugzilla-Assigned-To: unassigned at gcc dot gnu.org X-Bugzilla-Target-Milestone: 10.5 X-Bugzilla-Flags: X-Bugzilla-Changed-Fields: Message-ID: In-Reply-To: References: Content-Type: text/plain; charset="UTF-8" Content-Transfer-Encoding: quoted-printable X-Bugzilla-URL: http://gcc.gnu.org/bugzilla/ Auto-Submitted: auto-generated MIME-Version: 1.0 List-Id: https://gcc.gnu.org/bugzilla/show_bug.cgi?id=3D89549 --- Comment #25 from Lewis Hyatt --- This patch would make the note controllable via #pragma GCC diagnostic in t= he same way as the warning is: =3D=3D=3D=3D=3D diff --git a/gcc/c-family/c-indentation.cc b/gcc/c-family/c-indentation.cc index 85a3ae1b303..3b5d3b17cc9 100644 --- a/gcc/c-family/c-indentation.cc +++ b/gcc/c-family/c-indentation.cc @@ -310,7 +310,8 @@ should_warn_for_misleading_indentation (const token_indent_info &guard_tinfo, if (!guard_exploc.column || !body_exploc.column || !next_stmt_exploc.col= umn) { static bool issued_note =3D false; - if (!issued_note) + if (!issued_note + && warning_enabled_at (guard_loc, OPT_Wmisleading_indentation)) { /* Notify the user the first time this happens. */ issued_note =3D true; =3D=3D=3D=3D=3D I am not quite sure how to interpret Jakub's comments though (comment 14 and comment 16)... not sure whether he was saying this change would be undesira= ble, or just explaining why it doesn't seem strictly necessary.=