Debian Codegraph @

gcc/testsuite/g++.dg/warn/anonymous-namespace-3.C

raw
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"
6
7 struct B { std::auto_ptr<A> p; };
8
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 }
12 {
13 std::auto_ptr<A> p;
14 };
15
16 // { dg-prune-output "auto_ptr. is deprecated" }