Community
Participate
Working Groups
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
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.
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?
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.
Closing, please reopen if you find steps exposing a bug in the compiler as per language specs.