There are still some -*- C++ -*- markers in .cc files.
They were needed after GCC transitioned to C++ but still
used .c extensions for C++ files.

These tags are no more needed, and this patch removes these
tags from some .cc files that still have them.

The preferred way of letting Emacs chose a major mode is by
means of file-name based rules.  Such tags can be annoying
when you have a different rule for .cc files, for example
when .cc files are bound to GNU style but default C++ style isn't.

Notice that the vast majority of .cc files is already without that tag.

Bootstrapped and reg tested on x86_64.

Ok for trunk?

Johann

--

Remove -*- C++ -*- tags for Emacs from .cc files.

There are still some -*- C++ -*- markers in .cc files.
They were needed after GCC transitioned to C++ but still
used .c extensions for C++ files.

These tags are no more needed, and this patch removes these
tags from some .cc files that still have them.

The preferred way of letting Emacs chose a major mode is by
means of file-name based rules.  Such tags can be annoying
when you have a different rule for .cc files, for example
when .cc files are bound to GNU style but default C++ style isn't.

gcc/cp/
        * call.cc: Remove -*- C++ -*- tags for Emacs.
        * class.cc: Same.
        * constexpr.cc: Same.
        * decl.cc: Same.
        * init.cc: Same.
        * mangle.cc: Same.
        * mapper-resolver.cc: Same.
        * parser.cc: Same.
        * pt.cc: Same.
gcc/
        * splay-tree-utils.cc: Remove -*- C++ -*- tags for Emacs.
        * rtl-ssa/accesses.cc: Same.
        * rtl-ssa/blocks.cc: Same.
        * rtl-ssa/changes.cc: Same.
        * rtl-ssa/functions.cc: Same.
        * rtl-ssa/insns.cc: Same.
diff --git a/gcc/cp/call.cc b/gcc/cp/call.cc
index a071596085a..dc77a887678 100644
--- a/gcc/cp/call.cc
+++ b/gcc/cp/call.cc
@@ -1,4 +1,4 @@
-/* Functions related to invoking -*- C++ -*- methods and overloaded functions.
+/* Functions related to invoking C++ methods and overloaded functions.
    Copyright (C) 1987-2026 Free Software Foundation, Inc.
    Contributed by Michael Tiemann ([email protected]) and
    modified by Brendan Kehoe ([email protected]).
diff --git a/gcc/cp/class.cc b/gcc/cp/class.cc
index 8755403d362..2fcaa6cd81b 100644
--- a/gcc/cp/class.cc
+++ b/gcc/cp/class.cc
@@ -1,4 +1,4 @@
-/* Functions related to building -*- C++ -*- classes and their related objects.
+/* Functions related to building C++ classes and their related objects.
    Copyright (C) 1987-2026 Free Software Foundation, Inc.
    Contributed by Michael Tiemann ([email protected])
 
diff --git a/gcc/cp/constexpr.cc b/gcc/cp/constexpr.cc
index 8b9392b461b..868925012e5 100644
--- a/gcc/cp/constexpr.cc
+++ b/gcc/cp/constexpr.cc
@@ -1,4 +1,4 @@
-/* Perform -*- C++ -*- constant expression evaluation, including calls to
+/* Perform C++ constant expression evaluation, including calls to
    constexpr functions.  These routines are used both during actual parsing
    and during the instantiation of template functions.
 
diff --git a/gcc/cp/decl.cc b/gcc/cp/decl.cc
index 50ebb38b55b..dbe4fa44ce5 100644
--- a/gcc/cp/decl.cc
+++ b/gcc/cp/decl.cc
@@ -1,4 +1,4 @@
-/* Process declarations and variables for -*- C++ -*- compiler.
+/* Process declarations and variables for the C++ compiler.
    Copyright (C) 1988-2026 Free Software Foundation, Inc.
    Contributed by Michael Tiemann ([email protected])
 
diff --git a/gcc/cp/init.cc b/gcc/cp/init.cc
index 8d0018a31cc..502c1ee37a9 100644
--- a/gcc/cp/init.cc
+++ b/gcc/cp/init.cc
@@ -1,4 +1,4 @@
-/* Handle initialization things in -*- C++ -*-
+/* Handle initialization things in C++.
    Copyright (C) 1987-2026 Free Software Foundation, Inc.
    Contributed by Michael Tiemann ([email protected])
 
diff --git a/gcc/cp/mangle.cc b/gcc/cp/mangle.cc
index a287cded8ae..8c67b67b197 100644
--- a/gcc/cp/mangle.cc
+++ b/gcc/cp/mangle.cc
@@ -1,4 +1,4 @@
-/* Name mangling for the 3.0 -*- C++ -*- ABI.
+/* Name mangling for the 3.0 C++ ABI.
    Copyright (C) 2000-2026 Free Software Foundation, Inc.
    Written by Alex Samuel <[email protected]>
 
diff --git a/gcc/cp/mapper-resolver.cc b/gcc/cp/mapper-resolver.cc
index b73b77aecc5..0be4537bd21 100644
--- a/gcc/cp/mapper-resolver.cc
+++ b/gcc/cp/mapper-resolver.cc
@@ -1,4 +1,4 @@
-/* C++ modules.  Experimental!	-*- c++ -*-
+/* C++ modules.  Experimental!
    Copyright (C) 2020-2026 Free Software Foundation, Inc.
    Written by Nathan Sidwell <[email protected]> while at FaceBook
 
diff --git a/gcc/cp/parser.cc b/gcc/cp/parser.cc
index 35f7653a4f1..38b5bd3e1ce 100644
--- a/gcc/cp/parser.cc
+++ b/gcc/cp/parser.cc
@@ -1,4 +1,4 @@
-/* -*- C++ -*- Parser.
+/* C++ Parser.
    Copyright (C) 2000-2026 Free Software Foundation, Inc.
    Written by Mark Mitchell <[email protected]>.
 
diff --git a/gcc/cp/pt.cc b/gcc/cp/pt.cc
index b7f9ce4cb0a..c260f965da1 100644
--- a/gcc/cp/pt.cc
+++ b/gcc/cp/pt.cc
@@ -1,4 +1,4 @@
-/* Handle parameterized types (templates) for GNU -*- C++ -*-.
+/* Handle parameterized types (templates) for GNU C++.
    Copyright (C) 1992-2026 Free Software Foundation, Inc.
    Written by Ken Raeburn ([email protected]) while at Watchmaker Computing.
    Rewritten by Jason Merrill ([email protected]).
diff --git a/gcc/rtl-ssa/accesses.cc b/gcc/rtl-ssa/accesses.cc
index bb25436fb22..d89bc40f668 100644
--- a/gcc/rtl-ssa/accesses.cc
+++ b/gcc/rtl-ssa/accesses.cc
@@ -1,4 +1,4 @@
-// Implementation of access-related functions for RTL SSA           -*- C++ -*-
+// Implementation of access-related functions for RTL SSA.
 // Copyright (C) 2020-2026 Free Software Foundation, Inc.
 //
 // This file is part of GCC.
diff --git a/gcc/rtl-ssa/blocks.cc b/gcc/rtl-ssa/blocks.cc
index 85636da2aa9..462115a7aba 100644
--- a/gcc/rtl-ssa/blocks.cc
+++ b/gcc/rtl-ssa/blocks.cc
@@ -1,4 +1,4 @@
-// Implementation of basic-block-related functions for RTL SSA      -*- C++ -*-
+// Implementation of basic-block-related functions for RTL SSA.
 // Copyright (C) 2020-2026 Free Software Foundation, Inc.
 //
 // This file is part of GCC.
diff --git a/gcc/rtl-ssa/changes.cc b/gcc/rtl-ssa/changes.cc
index 8afe8ea4eb3..f2eeec2ad2b 100644
--- a/gcc/rtl-ssa/changes.cc
+++ b/gcc/rtl-ssa/changes.cc
@@ -1,4 +1,4 @@
-// RTL SSA routines for changing instructions                       -*- C++ -*-
+// RTL SSA routines for changing instructions.
 // Copyright (C) 2020-2026 Free Software Foundation, Inc.
 //
 // This file is part of GCC.
diff --git a/gcc/rtl-ssa/functions.cc b/gcc/rtl-ssa/functions.cc
index ad5ed95fc78..d7b01415ebb 100644
--- a/gcc/rtl-ssa/functions.cc
+++ b/gcc/rtl-ssa/functions.cc
@@ -1,4 +1,4 @@
-// Implementation of function-related RTL SSA functions             -*- C++ -*-
+// Implementation of function-related RTL SSA functions.
 // Copyright (C) 2020-2026 Free Software Foundation, Inc.
 //
 // This file is part of GCC.
diff --git a/gcc/rtl-ssa/insns.cc b/gcc/rtl-ssa/insns.cc
index 64bb0f931ae..77066f8ccc9 100644
--- a/gcc/rtl-ssa/insns.cc
+++ b/gcc/rtl-ssa/insns.cc
@@ -1,4 +1,4 @@
-// Implementation of instruction-related RTL SSA functions          -*- C++ -*-
+// Implementation of instruction-related RTL SSA functions.
 // Copyright (C) 2020-2026 Free Software Foundation, Inc.
 //
 // This file is part of GCC.
diff --git a/gcc/splay-tree-utils.cc b/gcc/splay-tree-utils.cc
index 5fc6d06339f..3c5bcc6963e 100644
--- a/gcc/splay-tree-utils.cc
+++ b/gcc/splay-tree-utils.cc
@@ -1,4 +1,4 @@
-// Splay tree utilities                                             -*- C++ -*-
+// Splay tree utilities.
 // Copyright (C) 2020-2026 Free Software Foundation, Inc.
 //
 // This file is part of GCC.

Reply via email to