This is the mail archive of the
gcc-patches@gcc.gnu.org
mailing list for the GCC project.
PR objc/23709
- From: "Nicola Pero" <nicola dot pero at meta-innovation dot com>
- To: "GCC Patches" <gcc-patches at gcc dot gnu dot org>
- Date: Tue, 19 Oct 2010 22:48:25 +0200 (CEST)
- Subject: PR objc/23709
This bug seems to have already been fixed in trunk :-) - it is about the parser
recovering gracefully from a syntax error; it may have been fixed by my
fix for PR objc/23710, or by something else. Anyway I just want to close
the bug but I'd like to add two testcases (one to ObjC and one to ObjC++)
extracted from the bug before closing it.
Ok to commit to trunk ?
Thanks
Index: gcc/testsuite/ChangeLog
===================================================================
--- gcc/testsuite/ChangeLog (revision 165706)
+++ gcc/testsuite/ChangeLog (working copy)
@@ -1,3 +1,9 @@
+2010-10-19 Nicola Pero <nicola.pero@meta-innovation.com>
+
+ PR objc/23709
+ * objc.dg/pr23709.m: New.
+ * obj-c++.dg/pr23709.m: New.
+
2010-10-19 Richard Henderson <rth@redhat.com>
* gcc.target/i386/fma3-fma.c: New.
Index: gcc/testsuite/objc.dg/pr23709.m
===================================================================
--- gcc/testsuite/objc.dg/pr23709.m (revision 0)
+++ gcc/testsuite/objc.dg/pr23709.m (revision 0)
@@ -0,0 +1,12 @@
+/* { dg-do compile } */
+
+@interface A
++(void)method: (int)parameter {} /* { dg-error "expected" } */
+@end
+
+@implementation A
++(void)method: (int)parameter
+{
+ *parameter; /* { dg-error "invalid type argument" } */
+}
+@end
Index: gcc/testsuite/obj-c++.dg/pr23709.mm
===================================================================
--- gcc/testsuite/obj-c++.dg/pr23709.mm (revision 0)
+++ gcc/testsuite/obj-c++.dg/pr23709.mm (revision 0)
@@ -0,0 +1,12 @@
+/* { dg-do compile } */
+
+@interface A
++(void)method: (int)parameter {} /* { dg-error "expected" } */
+@end
+
+@implementation A
++(void)method: (int)parameter
+{
+ *parameter; /* { dg-error "invalid type argument" } */
+}
+@end