Testcase for fixed PR c++/8237, committed version
Nathanael Nerode
neroden@twcny.rr.com
Wed Jan 1 15:02:00 GMT 2003
* g++.dg/parse/parens1.C: New test.
Index: g++.dg/parse/parens1.C
===================================================================
RCS file: g++.dg/parse/parens1.C
diff -N g++.dg/parse/parens1.C
--- /dev/null 1 Jan 1970 00:00:00 -0000
+++ g++.dg/parse/parens1.C 1 Jan 2003 15:01:24 -0000
@@ -0,0 +1,18 @@
+/* PR c++/8237 */
+/* { dg-do compile } */
+class A {
+public:
+ A() { }
+};
+
+class B {
+public:
+ B(A a) { }
+ void form() { }
+};
+
+int main() {
+ // This used to give a parse error.
+ B(A()).form();
+}
+
More information about the Gcc-patches
mailing list