diff options
Diffstat (limited to 'gcc/testsuite/g++.dg/lookup/anon5.C')
-rw-r--r-- | gcc/testsuite/g++.dg/lookup/anon5.C | 21 |
1 files changed, 21 insertions, 0 deletions
diff --git a/gcc/testsuite/g++.dg/lookup/anon5.C b/gcc/testsuite/g++.dg/lookup/anon5.C new file mode 100644 index 000000000..c3d36c20f --- /dev/null +++ b/gcc/testsuite/g++.dg/lookup/anon5.C @@ -0,0 +1,21 @@ +// PR c++/28409 +// shouldIbevisible should be emitted because it's an extern "C" decl with +// external linkage, even though it's in the anonymous namespace. + +namespace +{ + extern "C" int shouldIbevisible() + { + return 0; + } +} + +namespace t +{ + extern "C" int shouldIbevisible(void); +} + +int main(void) +{ + return t::shouldIbevisible(); +} |