https://gcc.gnu.org/g:6a20cd184f11c2a7a663eb3170fd6ac1c25f27a9

commit r17-1379-g6a20cd184f11c2a7a663eb3170fd6ac1c25f27a9
Author: Marek Polacek <[email protected]>
Date:   Fri Jun 5 13:43:29 2026 -0400

    c++: add missing auto_diagnostic_group
    
    Forgot this in r17-1355-gf213d6591640f7.
    
    gcc/cp/ChangeLog:
    
            * pt.cc (check_explicit_inst_of_var_template): Add
            auto_diagnostic_group.

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

diff --git a/gcc/cp/pt.cc b/gcc/cp/pt.cc
index ba2d14fa73dd..891e89f1d763 100644
--- a/gcc/cp/pt.cc
+++ b/gcc/cp/pt.cc
@@ -2885,6 +2885,7 @@ check_explicit_inst_of_var_template (tree inst, tree decl)
     /* All good.  */
     return true;
 
+  auto_diagnostic_group d;
   error ("type %qT for explicit instantiation %qD does not match declared "
         "type %qT", type2, decl, type1);
   inform (DECL_SOURCE_LOCATION (inst), "variable template declared here");

Reply via email to