Bug 72467 - Trailing semicolons reported as unreachable code
Summary: Trailing semicolons reported as unreachable code
Status: RESOLVED DUPLICATE of bug 11217
Alias: None
Product: JDT
Classification: Eclipse Project
Component: Core (show other bugs)
Version: 3.0   Edit
Hardware: All All
: P3 normal with 1 vote (vote)
Target Milestone: ---   Edit
Assignee: JDT-Core-Inbox CLA
QA Contact:
URL:
Whiteboard:
Keywords:
Depends on:
Blocks:
 
Reported: 2004-08-23 16:47 EDT by Michael Latta CLA
Modified: 2004-08-23 18:57 EDT (History)
0 users

See Also:


Attachments

Note You need to log in before you can comment on or make changes to this bug.
Description Michael Latta CLA 2004-08-23 16:47:34 EDT
The JLS allows trailing semicolons on statements, but Eclipse reports them as unrechable code.  Since 
this is a legal coding construct, and has no executible code it should not be reported as an error.  At a 
minimum there should be a setting that will disable this case as an error.
Comment 1 Olivier Thomann CLA 2004-08-23 18:57:55 EDT
Yes, but trailing semicolons still needs to be reachable.
javac 1.4.2 reports these statements as errors. javac 1.3.1 doesn't report the
statements as error.
So if you set up the compliance to be 1.4, the Eclipse compiler reports it as
error. If you set up the compliance to be 1.3, the Eclipse compiler ignores it.

Close as INVALID.

*** This bug has been marked as a duplicate of 11217 ***