diff options
Diffstat (limited to 'gcc/testsuite/g++.dg/warn/anonymous-namespace-3.C')
-rw-r--r-- | gcc/testsuite/g++.dg/warn/anonymous-namespace-3.C | 13 |
1 files changed, 13 insertions, 0 deletions
diff --git a/gcc/testsuite/g++.dg/warn/anonymous-namespace-3.C b/gcc/testsuite/g++.dg/warn/anonymous-namespace-3.C new file mode 100644 index 00000000000..fee48b46017 --- /dev/null +++ b/gcc/testsuite/g++.dg/warn/anonymous-namespace-3.C @@ -0,0 +1,13 @@ +// Test for the warning of exposing types from an anonymous namespace +// { dg-do compile } +// +#include <memory> +#include "anonymous-namespace-3.h" + +struct B { std::auto_ptr<A> p; }; + +#line 10 "foo.C" +struct C +{ // { dg-warning "uses the anonymous namespace" } + std::auto_ptr<A> p; +}; |