template<const char *str> const char *baz () { return str; } namespace { char foo[] = "foo"; };
const char * bar () { return baz<foo> (); } used to compile before the "make anon-namespace non-public" changes and still compiles when the anon namespace is changed for a named namespace and using namespace below it. -- Summary: [4.2 regression] Issue with anonymous namespace Product: gcc Version: 4.2.0 Status: UNCONFIRMED Severity: normal Priority: P3 Component: c++ AssignedTo: unassigned at gcc dot gnu dot org ReportedBy: jakub at redhat dot com http://gcc.gnu.org/bugzilla/show_bug.cgi?id=28407