https://gcc.gnu.org/bugzilla/show_bug.cgi?id=124582
--- Comment #6 from Patrick Palka <ppalka at gcc dot gnu.org> --- (In reply to nurullahcitil1536 from comment #5) > Is there any update on this? This is still happening on trunk... With gcc-16 > almost being released, people will run into this. (In my experience this > happens with reflection + import std + most headers) As a workaround try using the new --compile-std-module command line option, which builds the header unit <bits/stdc++.h> as well the std module. Whenever <bits/stdc++.h> is available as a header unit, the GCC 16 preprocessor transparently translates any standard library #includes intto import <bits/stdc++.h>, which sidesteps this textual inclusion declaration merging bug seen with -freflection (that we hope to fix properly for 16.2). The following works for me: $ cat 124709.C module; #include <vector> export module gcc_repr; import std; $ g++ -std=c++26 -fmodules -freflection --compile-std-module $ g++ -std=c++26 -fmodules -freflection 124709.C # works!
