public inbox for gcc-cvs@sourceware.org
help / color / mirror / Atom feed
* [gcc r14-8827] c++: add auto_diagnostic_group to early_check_defaulted_comparison
@ 2024-02-06 13:13 Marek Polacek
  0 siblings, 0 replies; only message in thread
From: Marek Polacek @ 2024-02-06 13:13 UTC (permalink / raw)
  To: gcc-cvs

https://gcc.gnu.org/g:68a8ec7c7404db6fce1be307a3d8bdde6cdbc6fb

commit r14-8827-g68a8ec7c7404db6fce1be307a3d8bdde6cdbc6fb
Author: Marek Polacek <polacek@redhat.com>
Date:   Mon Feb 5 21:52:19 2024 -0500

    c++: add auto_diagnostic_group to early_check_defaulted_comparison
    
    gcc/cp/ChangeLog:
    
            * method.cc (early_check_defaulted_comparison): Add
            auto_diagnostic_group.

Diff:
---
 gcc/cp/method.cc | 1 +
 1 file changed, 1 insertion(+)

diff --git a/gcc/cp/method.cc b/gcc/cp/method.cc
index 3b8dc75d1986..957496d3e180 100644
--- a/gcc/cp/method.cc
+++ b/gcc/cp/method.cc
@@ -1229,6 +1229,7 @@ early_check_defaulted_comparison (tree fn)
 	  ctx = TYPE_MAIN_VARIANT (parmtype);
 	  if (!is_friend (ctx, fn))
 	    {
+	      auto_diagnostic_group d;
 	      error_at (loc, "defaulted %qD is not a friend of %qT", fn, ctx);
 	      inform (location_of (ctx), "declared here");
 	      ok = false;

^ permalink raw reply	[flat|nested] only message in thread

only message in thread, other threads:[~2024-02-06 13:13 UTC | newest]

Thread overview: (only message) (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2024-02-06 13:13 [gcc r14-8827] c++: add auto_diagnostic_group to early_check_defaulted_comparison Marek Polacek

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).