java/3635: "empty declaration" warning too broad

pimlott@idiomtech.com pimlott@idiomtech.com
Tue Jul 10 09:16:00 GMT 2001


>Number:         3635
>Category:       java
>Synopsis:       "empty declaration" warning too broad
>Confidential:   no
>Severity:       non-critical
>Priority:       low
>Responsible:    unassigned
>State:          open
>Class:          sw-bug
>Submitter-Id:   net
>Arrival-Date:   Tue Jul 10 09:16:00 PDT 2001
>Closed-Date:
>Last-Modified:
>Originator:     Andrew Pimlott
>Release:        gcc version 3.0 (Debian)
>Organization:
>Environment:
Debian GNU/Linux "testing"
>Description:
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

>How-To-Repeat:
See code in description.
>Fix:

>Release-Note:
>Audit-Trail:
>Unformatted:
 >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.
 
 [This was originally sent to java@gcc.gnu.org with subject
 "empty declaration deprecated".  Alexandre 
 Petit-Bianco <apbianco@cygnus.com> replied confirming that
 it is probably a bug.]



More information about the Gcc-bugs mailing list