Hi!
The following patch adds a plugin (sorry, to check-g++ testsuite rather
than libstdc++ testsuite because in plugin.exp we have all the needed
infrastructure.
This currently FAILs:
Running /usr/src/gcc/gcc/testsuite/g++.dg/plugin/plugin.exp ...
FAIL: g++.dg/plugin/uglification-c++98.C -fplugin=./uglification_plugin.so at
line 9 (test for bogus messages, line )
FAIL: g++.dg/plugin/uglification-c++11.C -fplugin=./uglification_plugin.so at
line 9 (test for bogus messages, line )
FAIL: g++.dg/plugin/uglification-c++14.C -fplugin=./uglification_plugin.so at
line 9 (test for bogus messages, line )
FAIL: g++.dg/plugin/uglification-c++17.C -fplugin=./uglification_plugin.so at
line 9 (test for bogus messages, line )
FAIL: g++.dg/plugin/uglification-c++20.C -fplugin=./uglification_plugin.so at
line 9 (test for bogus messages, line )
FAIL: g++.dg/plugin/uglification-c++23.C -fplugin=./uglification_plugin.so at
line 9 (test for bogus messages, line )
FAIL: g++.dg/plugin/uglification-c++26.C -fplugin=./uglification_plugin.so at
line 9 (test for bogus messages, line )
(so no badnames, but lots of non-uglified names).
Full list of the failures with sort -u:
libstdc++-v3/include/bits/alloc_traits.h:922:22: note: non-uglified name 'swap'
libstdc++-v3/include/bits/basic_string.h:3874:45: note: non-uglified name
'allocator_type'
libstdc++-v3/include/bits/deque.tcc:1356:47: note: non-uglified name
'difference_type'
libstdc++-v3/include/bits/fs_path.h:1307:10: note: non-uglified name 'ext'
libstdc++-v3/include/bits/fs_path.h:1316:10: note: non-uglified name 'ext'
libstdc++-v3/include/bits/fs_path.h:1325:10: note: non-uglified name 'ext'
libstdc++-v3/include/bits/fs_path.h:1332:10: note: non-uglified name 'ext'
libstdc++-v3/include/bits/fs_path.h:204:13: note: non-uglified name 'value_type'
libstdc++-v3/include/bits/streambuf_iterator.h:441:60: note: non-uglified name
'traits_type'
libstdc++-v3/include/bits/streambuf_iterator.h:442:60: note: non-uglified name
'streambuf_type'
libstdc++-v3/include/bits/streambuf_iterator.h:443:60: note: non-uglified name
'int_type'
libstdc++-v3/include/bits/streambuf_iterator.h:488:60: note: non-uglified name
'traits_type'
libstdc++-v3/include/bits/streambuf_iterator.h:489:60: note: non-uglified name
'streambuf_type'
libstdc++-v3/include/bits/streambuf_iterator.h:490:60: note: non-uglified name
'int_type'
libstdc++-v3/include/ext/concurrence.h:293:24: note: non-uglified name 'mutex'
libstdc++-v3/include/ext/concurrence.h:303:44: note: non-uglified name 'mutex'
libstdc++-v3/include/ext/pb_ds/detail/resize_policy/hash_prime_size_policy_imp.hpp:145:34:
note: non-uglified name 'n'
libstdc++-v3/include/ext/pb_ds/detail/resize_policy/hash_prime_size_policy_imp.hpp:151:25:
note: non-uglified name 'other'
libstdc++-v3/include/ext/pb_ds/detail/resize_policy/hash_prime_size_policy_imp.hpp:157:35:
note: non-uglified name 'n'
libstdc++-v3/include/ext/pb_ds/detail/resize_policy/hash_prime_size_policy_imp.hpp:159:28:
note: non-uglified name 'p_upper'
libstdc++-v3/include/ext/pb_ds/detail/resize_policy/hash_prime_size_policy_imp.hpp:170:36:
note: non-uglified name 'n'
libstdc++-v3/include/ext/pb_ds/detail/resize_policy/hash_prime_size_policy_imp.hpp:172:22:
note: non-uglified name 'p_lower'
libstdc++-v3/include/ext/throw_allocator.h:116:22: note: non-uglified name 'l'
libstdc++-v3/include/ext/throw_allocator.h:124:18: note: non-uglified name 'p'
libstdc++-v3/include/ext/throw_allocator.h:124:28: note: non-uglified name
'size'
libstdc++-v3/include/ext/throw_allocator.h:126:18: note: non-uglified name
'entry'
libstdc++-v3/include/ext/throw_allocator.h:129:23: note: non-uglified name
'error'
libstdc++-v3/include/ext/throw_allocator.h:134:49: note: non-uglified name
'inserted'
libstdc++-v3/include/ext/throw_allocator.h:138:23: note: non-uglified name
'error'
libstdc++-v3/include/ext/throw_allocator.h:146:17: note: non-uglified name 'p'
libstdc++-v3/include/ext/throw_allocator.h:146:27: note: non-uglified name
'size'
libstdc++-v3/include/ext/throw_allocator.h:151:28: note: non-uglified name 'p'
libstdc++-v3/include/ext/throw_allocator.h:155:23: note: non-uglified name
'error'
libstdc++-v3/include/ext/throw_allocator.h:159:12: note: non-uglified name
'inserted'
libstdc++-v3/include/ext/throw_allocator.h:162:23: note: non-uglified name
'error'
libstdc++-v3/include/ext/throw_allocator.h:170:27: note: non-uglified name 'p'
libstdc++-v3/include/ext/throw_allocator.h:176:27: note: non-uglified name 'p'
libstdc++-v3/include/ext/throw_allocator.h:176:37: note: non-uglified name
'size'
libstdc++-v3/include/ext/throw_allocator.h:178:32: note: non-uglified name
'found'
libstdc++-v3/include/ext/throw_allocator.h:181:23: note: non-uglified name
'error'
libstdc++-v3/include/ext/throw_allocator.h:189:23: note: non-uglified name
'error'
libstdc++-v3/include/ext/throw_allocator.h:201:18: note: non-uglified name
'label'
libstdc++-v3/include/ext/throw_allocator.h:203:19: note: non-uglified name
'found'
libstdc++-v3/include/ext/throw_allocator.h:205:24: note: non-uglified name 'beg'
libstdc++-v3/include/ext/throw_allocator.h:206:24: note: non-uglified name 'end'
libstdc++-v3/include/ext/throw_allocator.h:217:14: note: non-uglified name 'beg'
libstdc++-v3/include/ext/throw_allocator.h:218:14: note: non-uglified name 'end'
libstdc++-v3/include/ext/throw_allocator.h:230:23: note: non-uglified name
'error'
libstdc++-v3/include/ext/throw_allocator.h:240:19: note: non-uglified name
'found'
libstdc++-v3/include/ext/throw_allocator.h:242:24: note: non-uglified name 'beg'
libstdc++-v3/include/ext/throw_allocator.h:243:24: note: non-uglified name 'end'
libstdc++-v3/include/ext/throw_allocator.h:253:14: note: non-uglified name 'beg'
libstdc++-v3/include/ext/throw_allocator.h:254:14: note: non-uglified name 'end'
libstdc++-v3/include/ext/throw_allocator.h:265:23: note: non-uglified name
'error'
libstdc++-v3/include/ext/throw_allocator.h:273:29: note: non-uglified name 'p'
libstdc++-v3/include/ext/throw_allocator.h:275:12: note: non-uglified name
'found'
libstdc++-v3/include/ext/throw_allocator.h:278:23: note: non-uglified name
'error'
libstdc++-v3/include/ext/throw_allocator.h:288:30: note: non-uglified name
'label'
libstdc++-v3/include/ext/throw_allocator.h:290:12: note: non-uglified name 'beg'
libstdc++-v3/include/ext/throw_allocator.h:291:12: note: non-uglified name 'end'
libstdc++-v3/include/ext/throw_allocator.h:292:19: note: non-uglified name
'found'
libstdc++-v3/include/ext/throw_allocator.h:302:23: note: non-uglified name
'error'
libstdc++-v3/include/ext/throw_allocator.h:314:22: note: non-uglified name 'p'
libstdc++-v3/include/ext/throw_allocator.h:314:32: note: non-uglified name
'size'
libstdc++-v3/include/ext/throw_allocator.h:318:32: note: non-uglified name 's'
libstdc++-v3/include/ext/throw_allocator.h:318:51: note: non-uglified name 'ref'
libstdc++-v3/include/ext/throw_allocator.h:324:12: note: non-uglified name 'buf'
libstdc++-v3/include/ext/throw_allocator.h:325:18: note: non-uglified name 'tab'
libstdc++-v3/include/ext/throw_allocator.h:327:21: note: non-uglified name 'l'
libstdc++-v3/include/ext/throw_allocator.h:344:32: note: non-uglified name 's'
libstdc++-v3/include/ext/throw_allocator.h:344:73: note: non-uglified name 'ref'
libstdc++-v3/include/ext/throw_allocator.h:350:12: note: non-uglified name 'buf'
libstdc++-v3/include/ext/throw_allocator.h:351:18: note: non-uglified name 'tab'
libstdc++-v3/include/ext/throw_allocator.h:353:21: note: non-uglified name 'l'
libstdc++-v3/include/ext/throw_allocator.h:389:28: note: non-uglified name 'os'
libstdc++-v3/include/ext/throw_allocator.h:391:17: note: non-uglified name
'error'
libstdc++-v3/include/ext/throw_allocator.h:392:27: note: non-uglified name
'base_type'
libstdc++-v3/include/ext/throw_allocator.h:394:33: note: non-uglified name 'beg'
libstdc++-v3/include/ext/throw_allocator.h:395:33: note: non-uglified name 'end'
libstdc++-v3/include/ext/throw_allocator.h:401:12: note: non-uglified name 'beg'
libstdc++-v3/include/ext/throw_allocator.h:402:12: note: non-uglified name 'end'
libstdc++-v3/include/ext/throw_allocator.h:522:29: note: non-uglified name
'size'
libstdc++-v3/include/ext/throw_allocator.h:574:31: note: non-uglified name
'distribution'
libstdc++-v3/include/ext/throw_allocator.h:575:19: note: non-uglified name
'generator'
libstdc++-v3/include/ext/throw_allocator.h:578:75: note: non-uglified name
'gen_t'
libstdc++-v3/include/ext/throw_allocator.h:579:25: note: non-uglified name
'distribution'
libstdc++-v3/include/ext/throw_allocator.h:580:20: note: non-uglified name
'generator'
libstdc++-v3/include/ext/throw_allocator.h:587:14: note: non-uglified name
'random'
libstdc++-v3/include/ext/throw_allocator.h:593:16: note: non-uglified name 'buf'
libstdc++-v3/include/pstl/glue_algorithm_defs.h:143:107: note: non-uglified
name 'result'
libstdc++-v3/include/pstl/glue_algorithm_defs.h:205:71: note: non-uglified name
'count'
libstdc++-v3/include/ranges:5264:23: note: non-uglified name 'Rs'
libstdc++-v3/include/ranges:8514:52: note: non-uglified name 'FirstSent'
libstdc++-v3/include/ranges:9486:15: note: non-uglified name 'element_type'
libstdc++-v3/include/span:530:12: note: non-uglified name 'data'
libstdc++-v3/include/span:531:12: note: non-uglified name 'size'
libstdc++-v3/include/span:532:22: note: non-uglified name 'extent'
libstdc++-v3/include/span:544:12: note: non-uglified name 'data'
libstdc++-v3/include/span:545:12: note: non-uglified name 'size'
libstdc++-v3/include/span:546:22: note: non-uglified name 'extent'
libstdc++-v3/include/system_error:243:27: note: non-uglified name
'make_error_code'
libstdc++-v3/include/system_error:376:27: note: non-uglified name
'make_error_condition'
libstdc++-v3/include/tr1/riemann_zeta.tcc:86:26: note: non-uglified name
'max_iter'
Now, some of those are clearly or likely bugs (ext, Rs, FirstSent, result?,
buf, l, s, n, beg, ...), others are maybe non-bugs because when say data is
used as automatic var in a function in a header which defines data member
function, it can't be macro already.
My question is whether it is easier to just uglify even those, or have some
whitelist on what identifiers are ok (either just grabbed from the ok cases
in the above list, or say distilled from the standards).
It would be highly desirable to have a C++ version specific whitelist
though, so that we still complain about say using meta as identifier in
C++23 etc., if std::mutex is not in C++98 then about using mutex local vars
in C++98 mode too etc., and in what form to include that whitelist in the
plugin.
Note, the plugin doesn't check function/class/function template/class
template names, only template parameters, function arguments and block scope
declaration names. If we have a whitelist, then perhaps we could check also
namespace and function/class {,template} names etc. and requite uglification
if they aren't in the whitelist.
2026-03-17 Jakub Jelinek <[email protected]>
* g++.dg/plugin/plugin.exp (plugin_test_list): Add uglification tests.
* g++.dg/plugin/uglification_plugin.cc: New file.
* g++.dg/plugin/uglification-c++98.C: New test.
* g++.dg/plugin/uglification-c++11.C: New test.
* g++.dg/plugin/uglification-c++14.C: New test.
* g++.dg/plugin/uglification-c++17.C: New test.
* g++.dg/plugin/uglification-c++20.C: New test.
* g++.dg/plugin/uglification-c++23.C: New test.
* g++.dg/plugin/uglification-c++26.C: New test.
--- gcc/testsuite/g++.dg/plugin/plugin.exp.jj 2026-01-02 09:56:10.336333661
+0100
+++ gcc/testsuite/g++.dg/plugin/plugin.exp 2026-03-17 16:54:28.967391245
+0100
@@ -78,6 +78,14 @@ set plugin_test_list [list \
show-template-tree-color-no-highlight-colors.C \
show-template-tree-color-labels.C \
show-template-tree-color-no-elide-type.C } \
+ { uglification_plugin.cc \
+ uglification-c++98.C \
+ uglification-c++11.C \
+ uglification-c++14.C \
+ uglification-c++17.C \
+ uglification-c++20.C \
+ uglification-c++23.C \
+ uglification-c++26.C } \
{ comment_plugin.cc comments-1.C } \
]
--- gcc/testsuite/g++.dg/plugin/uglification_plugin.cc.jj 2026-03-17
16:37:46.128622695 +0100
+++ gcc/testsuite/g++.dg/plugin/uglification_plugin.cc 2026-03-17
16:14:35.343385610 +0100
@@ -0,0 +1,201 @@
+#include "gcc-plugin.h"
+#include <stdlib.h>
+#include "config.h"
+#include "system.h"
+#include "coretypes.h"
+#include "tree.h"
+#include "intl.h"
+#include "cp/cp-tree.h"
+#include "cp/name-lookup.h"
+#include "diagnostic.h"
+
+int plugin_is_GPL_compatible;
+
+void plugin_walk_ns (tree);
+
+const char *badnames[] = {
+ /* See libstdc++-v3/testsuite/17_intro/{,bad}names.cc. */
+ "_A", "_B", "_C", "_G", "_L", "_N", "_P", "_S", "_T", "_U", "_X",
+ "__deref", "__used", "__unused", "__inline", "_Complex",
+ "__istype", "__maskrune", "__tolower", "__toupper", "__wchar_t",
+ "__wint_t", "_res", "_res_ext", "_C2", "__lockable", "__null_sentinel",
+ "__packed", "__weak", "__strong", "_In_", "_Inout_", "_Out_",
+ "_Reserved_", "__inout", "__in_opt", "__out_opt"
+};
+
+void
+plugin_check_decl (tree decl)
+{
+ if (decl == NULL_TREE)
+ return;
+
+ if (VAR_OR_FUNCTION_DECL_P (decl) && DECL_EXTERNAL (decl))
+ return;
+
+ tree name = DECL_NAME (decl);
+ if (name == NULL_TREE || IDENTIFIER_ANON_P (name) || name == this_identifier)
+ return;
+
+ const char *cname = IDENTIFIER_POINTER (name);
+ if (cname[0] != '_'
+ || (cname[1] != '_'
+ && !ISUPPER (cname[1])
+ && cname[1]))
+ {
+ inform (DECL_SOURCE_LOCATION (decl), "non-uglified name %qs", cname);
+ return;
+ }
+
+ bool badname = false;
+ for (int i = 0; i < ARRAY_SIZE (badnames); ++i)
+ if (strcmp (badnames[i], cname) == 0)
+ {
+ badname = true;
+ break;
+ }
+ if (!badname && cname[1] == 'E' && ISDIGIT (cname[2]))
+ {
+ if (cname[2] != '0'
+ && (!cname[3] || ((cname[2] == '1' || cname[2] == '2')
+ && ISDIGIT (cname[3])
+ && !cname[4])))
+ badname = true;
+ }
+ else if (memcmp (cname + 1, "_tg_", 4) == 0)
+ badname = true;
+ if (badname)
+ inform (DECL_SOURCE_LOCATION (decl), "badname %qs", cname);
+}
+
+tree
+plugin_check_tree (tree *tp, int */*walk_subtrees*/, void */*data*/)
+{
+ if (TREE_CODE (*tp) == BIND_EXPR)
+ for (tree var = BIND_EXPR_VARS (*tp); var; var = DECL_CHAIN (var))
+ plugin_check_decl (var);
+ if (TREE_CODE (*tp) == DECL_EXPR)
+ plugin_check_decl (DECL_EXPR_DECL (*tp));
+ return NULL_TREE;
+}
+
+void
+plugin_check_fn (tree decl)
+{
+ for (tree arg = DECL_ARGUMENTS (decl); arg; arg = DECL_CHAIN (arg))
+ plugin_check_decl (arg);
+
+ cp_walk_tree_without_duplicates (&DECL_SAVED_TREE (decl), plugin_check_tree,
+ NULL);
+}
+
+bool
+plugin_header_check (tree decl)
+{
+ expanded_location eloc = expand_location (DECL_SOURCE_LOCATION (decl));
+ if (eloc.file == NULL)
+ return false;
+ if (strstr (eloc.file, "/libstdc++-v3/include/") == NULL
+ && strstr (eloc.file, "/libstdc++-v3/libsupc++/") == NULL)
+ return false;
+ return true;
+}
+
+void
+plugin_walk_decl (tree decl)
+{
+ if (TREE_CODE (decl) == NAMESPACE_DECL)
+ {
+ plugin_walk_ns (decl);
+ return;
+ }
+
+ if (!plugin_header_check (decl))
+ return;
+
+ if (TREE_CODE (decl) == TEMPLATE_DECL)
+ {
+ tree parms = DECL_INNERMOST_TEMPLATE_PARMS (decl);
+ for (tree node : tree_vec_range (parms))
+ plugin_check_decl (TREE_VALUE (node));
+ }
+
+ if (DECL_FUNCTION_TEMPLATE_P (decl))
+ plugin_check_fn (DECL_TEMPLATE_RESULT (decl));
+
+ if (TREE_CODE (decl) == TYPE_DECL
+ && DECL_IMPLICIT_TYPEDEF_P (decl)
+ && RECORD_OR_UNION_TYPE_P (TREE_TYPE (decl)))
+ for (tree fld = TYPE_FIELDS (TREE_TYPE (decl));
+ fld; fld = DECL_CHAIN (fld))
+ plugin_walk_decl (fld);
+}
+
+void
+plugin_walk_binding (tree binding)
+{
+ tree value = NULL_TREE;
+
+ if (STAT_HACK_P (binding))
+ {
+ if (!STAT_TYPE_HIDDEN_P (binding)
+ && STAT_TYPE (binding))
+ return plugin_walk_decl (STAT_TYPE (binding));
+ else if (!STAT_DECL_HIDDEN_P (binding))
+ value = STAT_DECL (binding);
+ }
+ else
+ value = binding;
+
+ value = ovl_skip_hidden (value);
+ if (value)
+ {
+ value = OVL_FIRST (value);
+ return plugin_walk_decl (value);
+ }
+}
+
+void
+plugin_walk_ns (tree ns)
+{
+ using itert = hash_table<named_decl_hash>::iterator;
+ itert end (DECL_NAMESPACE_BINDINGS (ns)->end ());
+ for (itert iter (DECL_NAMESPACE_BINDINGS (ns)->begin ());
+ iter != end; ++iter)
+ {
+ tree b = *iter;
+ gcc_assert (TREE_CODE (b) != BINDING_VECTOR);
+ plugin_walk_binding (b);
+ }
+}
+
+void
+plugin_finish_unit (void *, void *)
+{
+ plugin_walk_ns (std_node);
+}
+
+void
+plugin_finish_parse_function (void *event_data, void *)
+{
+ tree decl = (tree) event_data;
+ if (!plugin_header_check (decl))
+ return;
+
+ /* Templates are handled from plugin_walk_ns. */
+ if (DECL_LANG_SPECIFIC (decl) && DECL_TEMPLATE_INFO (decl))
+ return;
+ plugin_check_fn (decl);
+}
+
+int
+plugin_init (struct plugin_name_args *plugin_info,
+ struct plugin_gcc_version *version)
+{
+ const char *plugin_name = plugin_info->base_name;
+
+ register_callback (plugin_name, PLUGIN_FINISH_UNIT,
+ plugin_finish_unit, NULL);
+ register_callback (plugin_name, PLUGIN_FINISH_PARSE_FUNCTION,
+ plugin_finish_parse_function, NULL);
+ return 0;
+}
--- gcc/testsuite/g++.dg/plugin/uglification-c++98.C.jj 2026-03-17
16:52:27.238446844 +0100
+++ gcc/testsuite/g++.dg/plugin/uglification-c++98.C 2026-03-17
16:52:40.508222726 +0100
@@ -0,0 +1,10 @@
+// Verify template parameter names, names of arguments and block scope decls
+// in functions and function templates are uglified and don't contain
+// badnames.
+// { dg-options "-O0 -std=c++98" }
+
+#include <bits/stdc++.h>
+#include <bits/extc++.h>
+
+// { dg-bogus "note: non-uglified name" "" { target *-*-* } 0 }
+// { dg-bogus "note: badname" "" { target *-*-* } 0 }
--- gcc/testsuite/g++.dg/plugin/uglification-c++11.C.jj 2026-03-17
16:52:52.727016358 +0100
+++ gcc/testsuite/g++.dg/plugin/uglification-c++11.C 2026-03-17
16:52:56.556951673 +0100
@@ -0,0 +1,10 @@
+// Verify template parameter names, names of arguments and block scope decls
+// in functions and function templates are uglified and don't contain
+// badnames.
+// { dg-options "-O0 -std=c++11" }
+
+#include <bits/stdc++.h>
+#include <bits/extc++.h>
+
+// { dg-bogus "note: non-uglified name" "" { target *-*-* } 0 }
+// { dg-bogus "note: badname" "" { target *-*-* } 0 }
--- gcc/testsuite/g++.dg/plugin/uglification-c++14.C.jj 2026-03-17
16:53:46.707104669 +0100
+++ gcc/testsuite/g++.dg/plugin/uglification-c++14.C 2026-03-17
16:53:16.031622759 +0100
@@ -0,0 +1,10 @@
+// Verify template parameter names, names of arguments and block scope decls
+// in functions and function templates are uglified and don't contain
+// badnames.
+// { dg-options "-O0 -std=c++14" }
+
+#include <bits/stdc++.h>
+#include <bits/extc++.h>
+
+// { dg-bogus "note: non-uglified name" "" { target *-*-* } 0 }
+// { dg-bogus "note: badname" "" { target *-*-* } 0 }
--- gcc/testsuite/g++.dg/plugin/uglification-c++17.C.jj 2026-03-17
16:54:00.757867359 +0100
+++ gcc/testsuite/g++.dg/plugin/uglification-c++17.C 2026-03-17
16:53:21.357532805 +0100
@@ -0,0 +1,10 @@
+// Verify template parameter names, names of arguments and block scope decls
+// in functions and function templates are uglified and don't contain
+// badnames.
+// { dg-options "-O0 -std=c++17" }
+
+#include <bits/stdc++.h>
+#include <bits/extc++.h>
+
+// { dg-bogus "note: non-uglified name" "" { target *-*-* } 0 }
+// { dg-bogus "note: badname" "" { target *-*-* } 0 }
--- gcc/testsuite/g++.dg/plugin/uglification-c++20.C.jj 2026-03-17
16:54:00.757867359 +0100
+++ gcc/testsuite/g++.dg/plugin/uglification-c++20.C 2026-03-17
16:53:27.575427792 +0100
@@ -0,0 +1,10 @@
+// Verify template parameter names, names of arguments and block scope decls
+// in functions and function templates are uglified and don't contain
+// badnames.
+// { dg-options "-O0 -std=c++20" }
+
+#include <bits/stdc++.h>
+#include <bits/extc++.h>
+
+// { dg-bogus "note: non-uglified name" "" { target *-*-* } 0 }
+// { dg-bogus "note: badname" "" { target *-*-* } 0 }
--- gcc/testsuite/g++.dg/plugin/uglification-c++23.C.jj 2026-03-17
16:54:00.757867359 +0100
+++ gcc/testsuite/g++.dg/plugin/uglification-c++23.C 2026-03-17
16:53:36.641274675 +0100
@@ -0,0 +1,10 @@
+// Verify template parameter names, names of arguments and block scope decls
+// in functions and function templates are uglified and don't contain
+// badnames.
+// { dg-options "-O0 -std=c++23" }
+
+#include <bits/stdc++.h>
+#include <bits/extc++.h>
+
+// { dg-bogus "note: non-uglified name" "" { target *-*-* } 0 }
+// { dg-bogus "note: badname" "" { target *-*-* } 0 }
--- gcc/testsuite/g++.dg/plugin/uglification-c++26.C.jj 2026-03-17
16:54:00.757867359 +0100
+++ gcc/testsuite/g++.dg/plugin/uglification-c++26.C 2026-03-17
16:53:41.819187221 +0100
@@ -0,0 +1,10 @@
+// Verify template parameter names, names of arguments and block scope decls
+// in functions and function templates are uglified and don't contain
+// badnames.
+// { dg-options "-O0 -std=c++26" }
+
+#include <bits/stdc++.h>
+#include <bits/extc++.h>
+
+// { dg-bogus "note: non-uglified name" "" { target *-*-* } 0 }
+// { dg-bogus "note: badname" "" { target *-*-* } 0 }
Jakub