public inbox for gcc-cvs@sourceware.org
help / color / mirror / Atom feed
From: Jakub Jelinek <jakub@gcc.gnu.org>
To: gcc-cvs@gcc.gnu.org
Subject: [gcc r13-3070] attribs: Add missing auto_diagnostic_group 3 times
Date: Tue,  4 Oct 2022 19:06:05 +0000 (GMT)	[thread overview]
Message-ID: <20221004190605.5C9E63850208@sourceware.org> (raw)

https://gcc.gnu.org/g:ade1e0d5896221500d1cbda38cd631cf80325aaa

commit r13-3070-gade1e0d5896221500d1cbda38cd631cf80325aaa
Author: Jakub Jelinek <jakub@redhat.com>
Date:   Tue Oct 4 21:05:16 2022 +0200

    attribs: Add missing auto_diagnostic_group 3 times
    
    In these spots, the error/error_at has some inform afterwards which are
    explanation part of the same diagnostics, so should be tied with
    auto_diagnostic_group with it.
    
    2022-10-04  Jakub Jelinek  <jakub@redhat.com>
    
            * attribs.cc (handle_ignored_attributes_option, decl_attributes,
            common_function_versions): Use auto_diagnostic_group.

Diff:
---
 gcc/attribs.cc | 3 +++
 1 file changed, 3 insertions(+)

diff --git a/gcc/attribs.cc b/gcc/attribs.cc
index b1f103222aa..1462c1192ae 100644
--- a/gcc/attribs.cc
+++ b/gcc/attribs.cc
@@ -251,6 +251,7 @@ handle_ignored_attributes_option (vec<char *> *v)
       /* We don't accept '::attr'.  */
       if (cln == nullptr || cln == opt)
 	{
+	  auto_diagnostic_group d;
 	  error ("wrong argument to ignored attributes");
 	  inform (input_location, "valid format is %<ns::attr%> or %<ns::%>");
 	  continue;
@@ -732,6 +733,7 @@ decl_attributes (tree *node, tree attributes, int flags,
 	      || (spec->max_length >= 0
 		  && nargs > spec->max_length))
 	    {
+	      auto_diagnostic_group d;
 	      error ("wrong number of arguments specified for %qE attribute",
 		     name);
 	      if (spec->max_length < 0)
@@ -1167,6 +1169,7 @@ common_function_versions (tree fn1, tree fn2)
 	      std::swap (fn1, fn2);
 	      attr1 = attr2;
 	    }
+	  auto_diagnostic_group d;
 	  error_at (DECL_SOURCE_LOCATION (fn2),
 		    "missing %<target%> attribute for multi-versioned %qD",
 		    fn2);

                 reply	other threads:[~2022-10-04 19:06 UTC|newest]

Thread overview: [no followups] expand[flat|nested]  mbox.gz  Atom feed

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=20221004190605.5C9E63850208@sourceware.org \
    --to=jakub@gcc.gnu.org \
    --cc=gcc-cvs@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).