This is the mail archive of the java-patches@gcc.gnu.org mailing list for the Java 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]

Patch: RFA: FIx PR java/19674


This patch fixes java/19674:

http://gcc.gnu.org/bugzilla/show_bug.cgi?id=19674

Empty declarations (";") are permitted in class and interface bodies. gcj will currently accept them in class bodies but not in interfaces. This patch updates our grammar to be more consistent with the JLS. Note that we still correctly warn about empty declarations when -Wall is used.

OK to commit?

Bryce

2005-07-04  Bryce McKinlay  <mckinlay@redhat.com>

	PR java/19674
	* parse.y (interface_member_declaration): Allow empty statements in
	interface declarations.

Index: parse.y
===================================================================
RCS file: /cvs/gcc/gcc/gcc/java/parse.y,v
retrieving revision 1.544
diff -u -r1.544 parse.y
--- parse.y	1 Jul 2005 15:21:09 -0000	1.544
+++ parse.y	4 Jul 2005 23:14:33 -0000
@@ -1319,6 +1319,7 @@
 		{ end_class_declaration (1); }
 |	interface_declaration	/* Added, JDK1.1 inner interfaces */
 		{ end_class_declaration (1); }
+|	empty_statement
 ;
 
 constant_declaration:

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