From mboxrd@z Thu Jan 1 00:00:00 1970 From: pimlott@idiomtech.com To: gcc-gnats@gcc.gnu.org Subject: java/3635: "empty declaration" warning too broad Date: Tue, 10 Jul 2001 09:16:00 -0000 Message-id: <20010710160655.24191.qmail@sourceware.cygnus.com> X-SW-Source: 2001-07/msg00273.html List-Id: >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 replied confirming that it is probably a bug.]