empty declaration deprecated
Andrew Pimlott
andrew@pimlott.ne.mediaone.net
Tue Jul 10 06:58:00 GMT 2001
I am fairly new to java and gcj, and I am confused by the warning
generated by
class Test
{
void foo() { ; }
}
% gcj-3.0 -C -Wall Test.java
Test.java:3: warning: An empty declaration is a deprecated feature that should not be used.
void foo() { ; }
^
1 warning
>From what I can find (mainly, the bug report gcj/295), this warning
is supposed to be about semicolons after inner classes. The JLS
second edition says nothing bad about empty statements, so I hope
this is a mistake.
The code I actually care about is something like
for (i=0; i<arr.length && arr[i] == null; i++) ;
I hope that isn't really deprecated.
I am using gcj 3.0 from Debian unstable.
Thanks for your help,
Andrew
More information about the Java
mailing list