Bug 110544 - [compiler] warning on unreachable code in for updater statement
Summary: [compiler] warning on unreachable code in for updater statement
Status: VERIFIED DUPLICATE of bug 48399
Alias: None
Product: JDT
Classification: Eclipse Project
Component: Core (show other bugs)
Version: 3.1   Edit
Hardware: PC Linux
: P3 enhancement (vote)
Target Milestone: 3.5 M4   Edit
Assignee: Philipe Mulet CLA
QA Contact:
URL:
Whiteboard:
Keywords:
Depends on:
Blocks:
 
Reported: 2005-09-25 17:59 EDT by Adam Kiezun CLA
Modified: 2008-12-09 04:45 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 Adam Kiezun CLA 2005-09-25 17:59:49 EDT
3.1
void foo(int x, int[] array) {
	for (int i = 0; 
	     i < array.length; 
	     i++) {//dead code
		if (x == array[i])
			return;
		else
			break;
	}
}

the updater code is dead - the loop never actually loops
Comment 1 Philipe Mulet CLA 2007-04-02 07:20:51 EDT

*** This bug has been marked as a duplicate of bug 48399 ***
Comment 2 Philipe Mulet CLA 2008-11-21 05:18:17 EST
Added FlowAnalysisTest#test057
Comment 3 Jerome Lanneluc CLA 2008-12-09 04:45:25 EST
Verified for 3.5M4 using I20081209-0100