This is the mail archive of the gcc-patches@gcc.gnu.org mailing list for the GCC project.


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]
Other format: [Raw text]

Testcase for fixed PR c++/8842


Applied.

	g++.dg/parse/parens2.C: New test.

Index: g++.dg/parse/parens2.C
===================================================================
RCS file: g++.dg/parse/parens2.C
diff -N g++.dg/parse/parens2.C
--- /dev/null	1 Jan 1970 00:00:00 -0000
+++ g++.dg/parse/parens2.C	1 Jan 2003 16:31:36 -0000
@@ -0,0 +1,11 @@
+/* PR c++/8842. */
+/* { dg-do compile } */
+int main( int argc, char* argv )
+{
+    int i = 5;
+    // This always worked:
+    // double l1 =  double(int(i)) / double(int(i));
+    // But this used to give a parse error before the `/' token:
+    double l2 = (double(int(i)) / double(int(i))); 
+}
+


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]