Bug 47803 - Unreachable code: Add an Ignore/Warning/Error choice to the Java compiler panel
Summary: Unreachable code: Add an Ignore/Warning/Error choice to the Java compiler panel
Status: RESOLVED INVALID
Alias: None
Product: JDT
Classification: Eclipse Project
Component: Core (show other bugs)
Version: 3.0   Edit
Hardware: PC Windows XP
: P3 major (vote)
Target Milestone: 3.0 M6   Edit
Assignee: JDT-Core-Inbox CLA
QA Contact:
URL:
Whiteboard:
Keywords:
Depends on:
Blocks:
 
Reported: 2003-12-01 09:38 EST by Francis ANDRE CLA
Modified: 2003-12-01 15:37 EST (History)
1 user (show)

See Also:


Attachments

Note You need to log in before you can comment on or make changes to this bug.
Description Francis ANDRE CLA 2003-12-01 09:38:39 EST
Hi

Depending on the input grammar and on options of generation, JavaCC generates 
Java code that contains unreachable code detected by the compiler. As there is 
no option to ignore this error, I cannot switch from Eclipse 2.0.1 to Eclipse M3

Could you readd the  "2.0 Unreachable code" radio button to the 
Preference/Java/Compiler/Advanced panel Ignoring/Warning/Erroring unreachable 
code.

Regards

Francis ANDRE
Comment 1 Dirk Baeumer CLA 2003-12-01 12:56:20 EST
Philippe, as far as I can remember we removed this since this compiler 
flag "broke" the language spec. Can you please comment on this. Thanks.
Comment 2 Olivier Thomann CLA 2003-12-01 13:16:20 EST
If we add this again, we don't follow the JLS that states as an error any
unreachable code.
Please give an example of code that contains unreachable code. Can javac compile it?
Comment 3 Philipe Mulet CLA 2003-12-01 15:35:46 EST
Unless you found a bug in our compiler were it incorrectly reject some valid 
code (as per JLS), we shouldn't accept a super-set of the language any longer.
We used to be doing so, but we got complaints that we were breaking the spec, 
which was a valid point.

We have no plans to revive this permissive mode.
Comment 4 Philipe Mulet CLA 2003-12-01 15:37:11 EST
Closing, please reopen if you find steps exposing a bug in the compiler as per 
language specs.