This is the mail archive of the
gcc-bugs@gcc.gnu.org
mailing list for the GCC project.
java/3635: "empty declaration" warning too broad
- To: gcc-gnats at gcc dot gnu dot org
- Subject: java/3635: "empty declaration" warning too broad
- From: pimlott at idiomtech dot com
- Date: 10 Jul 2001 16:06:55 -0000
- Reply-To: pimlott at idiomtech dot com
>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.]