From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: by sourceware.org (Postfix, from userid 2153) id 5C9E63850208; Tue, 4 Oct 2022 19:06:05 +0000 (GMT) DKIM-Filter: OpenDKIM Filter v2.11.0 sourceware.org 5C9E63850208 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gcc.gnu.org; s=default; t=1664910365; bh=LeB9hePpp3Jjjnu6Wnh5T+YZqTdmDga3M75MZnBPcig=; h=From:To:Subject:Date:From; b=iXWgPeNmZce9AJ9lAj64/oOzLWCe1qbEZUeHkVxuMEaBlDE1iwsQSd9rYgLRqqmz0 r75FWfcQc9g6GqtR5tSMD86SnRCeQrIkxlwnweHEVvSoLA5G/grhlDafU3/YXVMMxK eSya3nsX09F3NwAyKTP2v+27WaAg2B4ZNb4q0wGg= MIME-Version: 1.0 Content-Transfer-Encoding: 7bit Content-Type: text/plain; charset="utf-8" From: Jakub Jelinek To: gcc-cvs@gcc.gnu.org Subject: [gcc r13-3070] attribs: Add missing auto_diagnostic_group 3 times X-Act-Checkin: gcc X-Git-Author: Jakub Jelinek X-Git-Refname: refs/heads/master X-Git-Oldrev: 87b0fe37a2a5916cd09586e2af83b8203f57612a X-Git-Newrev: ade1e0d5896221500d1cbda38cd631cf80325aaa Message-Id: <20221004190605.5C9E63850208@sourceware.org> Date: Tue, 4 Oct 2022 19:06:05 +0000 (GMT) List-Id: https://gcc.gnu.org/g:ade1e0d5896221500d1cbda38cd631cf80325aaa commit r13-3070-gade1e0d5896221500d1cbda38cd631cf80325aaa Author: Jakub Jelinek 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 * 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 *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 % or %"); 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 % attribute for multi-versioned %qD", fn2);