main1.C: New test.
authorAlexandre Oliva <oliva@dcc.unicamp.br>
Sun, 11 Oct 1998 18:53:41 +0000 (18:53 +0000)
committerAlexandre Oliva <oliva@gcc.gnu.org>
Sun, 11 Oct 1998 18:53:41 +0000 (18:53 +0000)
* g++.old-deja/g++.ns/main1.C: New test.  main() should only be
  reserved in the global namespace

From-SVN: r22992

gcc/testsuite/ChangeLog
gcc/testsuite/g++.old-deja/g++.ns/main1.C [new file with mode: 0644]

index f01ab0574c32015ec9a753835ad0b3d25a86ec4a..f421283a5e71b0cae9212c1711613130f74d9bfd 100644 (file)
@@ -1,5 +1,8 @@
 1998-10-11  Alexandre Oliva  <oliva@dcc.unicamp.br>
 
+       * g++.old-deja/g++.ns/main1.C: New test.  main() should only be
+       reserved in the global namespace
+
        * g++.old-deja/g++.pt/instantiate4.C: New test: -frepo does not
        generate needed virtual table
 
diff --git a/gcc/testsuite/g++.old-deja/g++.ns/main1.C b/gcc/testsuite/g++.old-deja/g++.ns/main1.C
new file mode 100644 (file)
index 0000000..a820e0a
--- /dev/null
@@ -0,0 +1,17 @@
+// Build don't link:
+
+// main is only reserved in the global namespace [basic.start.main]/3
+
+// submitted by Gerald Gutierrez <gutier@intergate.bc.ca>
+
+// excess errors test - XFAIL *-*-*
+
+namespace A { void main () { } }
+namespace B { void main () { } }
+namespace C {
+  void main () { }
+  namespace D {
+    void main () { }
+  }
+}
+