c++: Don't ICE to build private access error message [PR116323]
[official-gcc.git] / gcc / testsuite / g++.dg / warn / anonymous-namespace-3.C
blobce5745b25f0ccf1579feca16ae663ae503fe741a
1 // Test for the warning of exposing types from an anonymous namespace
2 // { dg-do compile }
3 //
4 #include <memory>
5 #include "anonymous-namespace-3.h"
7 struct B { std::auto_ptr<A> p; };
9 #line 10 "foo.C"
10 struct C // { dg-warning "has internal linkage" "" { target c++11 } }
11 // { dg-warning "uses the anonymous namespace" "" { target c++98_only } .-1 }
13   std::auto_ptr<A> p;
16 // { dg-prune-output "auto_ptr. is deprecated" }