Message ID | 66f649e5.170a0220.1308b0.3e86@mx.google.com |
---|---|
State | New |
Headers | show |
Series | c++/modules: Implement P1815 "Translation-unit-local entities" | expand |
On 9/27/24 2:00 AM, Nathaniel Shead wrote: > Bootstrapped and regtested on x86_64-pc-linux-gnu and aarch64-unknown-linux-gnu, > OK for trunk? > > -- >8 -- > > This adds a new xtreme-header testcase to ensure that we have no > regressions with regards to exposures of TU-local declarations > in the standard library header files. > > A more restrictive test would be to do 'export extern "C++"' here, but > unfortunately the system headers on some targets declare TU-local > entities, so we'll make do with checking that at least the C++ standard > library headers don't refer to such entities. Looks fine, please squash this with the patch that adds the warning. > PR c++/115126 > > gcc/testsuite/ChangeLog: > > * g++.dg/modules/xtreme-header-8.C: New test. > > Signed-off-by: Nathaniel Shead <nathanieloshead@gmail.com> > --- > gcc/testsuite/g++.dg/modules/xtreme-header-8.C | 8 ++++++++ > 1 file changed, 8 insertions(+) > create mode 100644 gcc/testsuite/g++.dg/modules/xtreme-header-8.C > > diff --git a/gcc/testsuite/g++.dg/modules/xtreme-header-8.C b/gcc/testsuite/g++.dg/modules/xtreme-header-8.C > new file mode 100644 > index 00000000000..9da4e01cc68 > --- /dev/null > +++ b/gcc/testsuite/g++.dg/modules/xtreme-header-8.C > @@ -0,0 +1,8 @@ > +// PR c++/115126 > +// { dg-additional-options "-fmodules-ts -Wignored-exposures" } > +// { dg-module-cmi xstd } > + > +export module xstd; > +extern "C++" { > + #include "xtreme-header.h" > +}
diff --git a/gcc/testsuite/g++.dg/modules/xtreme-header-8.C b/gcc/testsuite/g++.dg/modules/xtreme-header-8.C new file mode 100644 index 00000000000..9da4e01cc68 --- /dev/null +++ b/gcc/testsuite/g++.dg/modules/xtreme-header-8.C @@ -0,0 +1,8 @@ +// PR c++/115126 +// { dg-additional-options "-fmodules-ts -Wignored-exposures" } +// { dg-module-cmi xstd } + +export module xstd; +extern "C++" { + #include "xtreme-header.h" +}
Bootstrapped and regtested on x86_64-pc-linux-gnu and aarch64-unknown-linux-gnu, OK for trunk? -- >8 -- This adds a new xtreme-header testcase to ensure that we have no regressions with regards to exposures of TU-local declarations in the standard library header files. A more restrictive test would be to do 'export extern "C++"' here, but unfortunately the system headers on some targets declare TU-local entities, so we'll make do with checking that at least the C++ standard library headers don't refer to such entities. PR c++/115126 gcc/testsuite/ChangeLog: * g++.dg/modules/xtreme-header-8.C: New test. Signed-off-by: Nathaniel Shead <nathanieloshead@gmail.com> --- gcc/testsuite/g++.dg/modules/xtreme-header-8.C | 8 ++++++++ 1 file changed, 8 insertions(+) create mode 100644 gcc/testsuite/g++.dg/modules/xtreme-header-8.C