Hi! Similar thing to the last, we also want to verify std.cc module exports in C++29 mode.
Tested on x86_64-linux, ok for trunk? 2026-06-25 Jakub Jelinek <[email protected]> * g++.dg/plugin/plugin.exp (plugin_test_list): Add std-module-exports-c++29.C. * g++.dg/plugin/std_module_exports_plugin.cc (whitelist_std): Add cxx29 enumerator, change value of all. (plugin_dump_decl): Handle C++29. * g++.dg/plugin/std-module-exports-c++29.C: New test. --- gcc/testsuite/g++.dg/plugin/plugin.exp.jj 2026-06-25 09:37:19.480794688 +0200 +++ gcc/testsuite/g++.dg/plugin/plugin.exp 2026-06-25 09:39:17.186280859 +0200 @@ -93,7 +93,8 @@ set plugin_test_list [list \ { std_module_exports_plugin.cc \ std-module-exports-c++20.C \ std-module-exports-c++23.C \ - std-module-exports-c++26.C } \ + std-module-exports-c++26.C \ + std-module-exports-c++29.C } \ { comment_plugin.cc comments-1.C } \ ] --- gcc/testsuite/g++.dg/plugin/std_module_exports_plugin.cc.jj 2026-05-19 21:53:08.670754912 +0200 +++ gcc/testsuite/g++.dg/plugin/std_module_exports_plugin.cc 2026-06-25 09:41:19.520707500 +0200 @@ -19,7 +19,8 @@ enum class whitelist_std { cxx20 = 1 << 0, cxx23 = 1 << 1, cxx26 = 1 << 2, - all = (1 << 3) - 1 + cxx29 = 1 << 3, + all = (1 << 4) - 1 }; struct { const char *name; @@ -98,6 +99,8 @@ plugin_dump_decl (tree decl, char *scope this_std = whitelist_std::cxx23; else if (cxx_dialect == cxx26) this_std = whitelist_std::cxx26; + else if (cxx_dialect == cxx29) + this_std = whitelist_std::cxx29; for (int i = 0; i < ARRAY_SIZE (whitelist); ++i) if (strncmp (whitelist[i].name, scope, scope_len) == 0 && strcmp (whitelist[i].name + scope_len, --- gcc/testsuite/g++.dg/plugin/std-module-exports-c++29.C.jj 2026-06-25 09:39:30.715106862 +0200 +++ gcc/testsuite/g++.dg/plugin/std-module-exports-c++29.C 2026-06-25 09:40:53.097047337 +0200 @@ -0,0 +1,11 @@ +// Test bits/std.cc exports everything it should. +// This is done using a plugin to walk std namespace and +// its child namespaces, looking for decls with non-uglified +// names which aren't deprecated and are not exported. +// { dg-do link } +// { dg-options "-O0 -std=c++29 -fmodules -freflection -x c++-system-module bits/std.cc -x none" } + +int +main () +{ +} Jakub
