Bug 39849 - Unreachable code not detected
Summary: Unreachable code not detected
Status: RESOLVED WONTFIX
Alias: None
Product: JDT
Classification: Eclipse Project
Component: Core (show other bugs)
Version: 2.1   Edit
Hardware: PC Windows XP
: P3 normal (vote)
Target Milestone: 3.0 M2   Edit
Assignee: JDT-Core-Inbox CLA
QA Contact:
URL:
Whiteboard:
Keywords:
Depends on:
Blocks:
 
Reported: 2003-07-10 04:14 EDT by Martin Aeschlimann CLA
Modified: 2003-07-10 06:20 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 Martin Aeschlimann CLA 2003-07-10 04:14:21 EDT
20030709

In the nightly build N20030710 we had a failure because
return (ITypeBinding[]) res.toArray(new ITypeBinding[res.size()]);;
(note the extra semicolon) was markes as 'Unreachable code'

In eclipse I had 'Unreachable code' set to error but was no error shows up .
Comment 1 Philipe Mulet CLA 2003-07-10 06:20:26 EDT
The compiler used in the nightly build has a bug (see bug 39172).
In 1.3 compliant mode, no error should be reported for this pattern. This 
diagnosis should only occur in 1.4 mode.

A way to find these potential issues is to set your compiler in 1.4 compliant 
mode, but with source 1.3 and target 1.1. This will flag these inconsistencies.

Alternatively, you can enable the warning for superfluous semicolons, and get 
rid of all of them.