aboutsummaryrefslogtreecommitdiff
path: root/gcc
diff options
context:
space:
mode:
authorAlexandre Oliva <oliva@dcc.unicamp.br>1998-10-11 18:53:41 +0000
committerAlexandre Oliva <oliva@gcc.gnu.org>1998-10-11 18:53:41 +0000
commit72b1c4daac5e2d5df25f2d76e2f563c1b46ddb9d (patch)
treed099f486111cb561b87d03fa7f1acb05670a28cf /gcc
parent7f6391b2082bd1c04a8edcde66c44f04d41c5499 (diff)
downloadgcc-72b1c4daac5e2d5df25f2d76e2f563c1b46ddb9d.zip
gcc-72b1c4daac5e2d5df25f2d76e2f563c1b46ddb9d.tar.gz
gcc-72b1c4daac5e2d5df25f2d76e2f563c1b46ddb9d.tar.bz2
main1.C: New test.
* g++.old-deja/g++.ns/main1.C: New test. main() should only be reserved in the global namespace From-SVN: r22992
Diffstat (limited to 'gcc')
-rw-r--r--gcc/testsuite/ChangeLog3
-rw-r--r--gcc/testsuite/g++.old-deja/g++.ns/main1.C17
2 files changed, 20 insertions, 0 deletions
diff --git a/gcc/testsuite/ChangeLog b/gcc/testsuite/ChangeLog
index f01ab05..f421283 100644
--- a/gcc/testsuite/ChangeLog
+++ b/gcc/testsuite/ChangeLog
@@ -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
index 0000000..a820e0a
--- /dev/null
+++ b/gcc/testsuite/g++.old-deja/g++.ns/main1.C
@@ -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 () { }
+ }
+}
+