public inbox for gcc-bugs@sourceware.org
help / color / mirror / Atom feed
From: "lhyatt at gcc dot gnu.org" <gcc-bugzilla@gcc.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	[thread overview]
Message-ID: <bug-89549-4-AOpMhxENje@http.gcc.gnu.org/bugzilla/> (raw)
In-Reply-To: <bug-89549-4@http.gcc.gnu.org/bugzilla/>

https://gcc.gnu.org/bugzilla/show_bug.cgi?id=89549

--- Comment #25 from Lewis Hyatt <lhyatt at gcc dot gnu.org> ---
This patch would make the note controllable via #pragma GCC diagnostic in the
same way as the warning is:

=====
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.column)
     {
       static bool issued_note = 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 = true;

=====

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 undesirable,
or just explaining why it doesn't seem strictly necessary.

  parent reply	other threads:[~2022-10-10 14:34 UTC|newest]

Thread overview: 9+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
     [not found] <bug-89549-4@http.gcc.gnu.org/bugzilla/>
2021-05-14  9:51 ` [Bug c/89549] [9/10/11/12 " jakub at gcc dot gnu.org
2021-06-01  8:13 ` rguenth at gcc dot gnu.org
2022-05-27  9:40 ` [Bug c/89549] [10/11/12/13 " rguenth at gcc dot gnu.org
2022-06-28 10:36 ` jakub at gcc dot gnu.org
2022-09-08 19:09 ` dblaikie at gmail dot com
2022-10-09  7:24 ` egallager at gcc dot gnu.org
2022-10-10 14:34 ` lhyatt at gcc dot gnu.org [this message]
2022-10-10 18:09 ` dblaikie at gmail dot com
2023-07-07 10:34 ` [Bug c/89549] [11/12/13/14 " rguenth at gcc dot gnu.org

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=bug-89549-4-AOpMhxENje@http.gcc.gnu.org/bugzilla/ \
    --to=gcc-bugzilla@gcc.gnu.org \
    --cc=gcc-bugs@gcc.gnu.org \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).