This is the mail archive of the java@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]

empty declaration deprecated


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


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