* g++.old-deja/g++.ns/extern1.C: New test. Extern declarations
within functions should introduce names into the innermost
enclosing namespace
From-SVN: r22902
1998-10-08 Alexandre Oliva <oliva@dcc.unicamp.br>
- * g++.old-deja/g++.other/init7.C: New test: retry initialization
+ * g++.old-deja/g++.ns/extern1.C: New test. Extern declarations
+ within functions should introduce names into the innermost
+ enclosing namespace
+
+ * g++.old-deja/g++.other/init7.C: New test. Retry initialization
of static locals if first initialization throws
Wed Oct 7 12:00:20 1998 Jim Wilson <wilson@cygnus.com>
--- /dev/null
+// Build don't run:
+
+// Based on a testcase by eyal.ben-david@aks.com
+
+// An extern declaration of an undeclared object within a function
+// introduces the object into the enclosing namespace [basic.link]/7
+
+namespace {
+ void foo() {
+ extern int xx; // causes linker error - XFAIL *-*-*
+ xx = 0;
+ }
+ int xx = 1;
+}
+
+int main() {
+ xx = 2;
+}