Index: ChangeLog from Ranjit Mathew PR java/19277 * check-init.c (check_init): Take care of references that do not have an explicit final variable declaration (e.g. array length access) for pre/post in/de-crement operators. Index: check-init.c =================================================================== --- check-init.c 2005-01-10 13:04:36.000000000 +0530 +++ check-init.c 2005-01-10 16:24:11.000000000 +0530 @@ -833,5 +833,11 @@ check_init (tree exp, words before) tmp = get_variable_decl (TREE_OPERAND (exp, 0)); if (tmp != NULL_TREE && DECL_FINAL (tmp)) - final_assign_error (DECL_NAME (tmp)); + final_assign_error (DECL_NAME (tmp)); + else if (TREE_CODE (tmp = TREE_OPERAND (exp, 0)) == COMPONENT_REF) + { + tree decl = TREE_OPERAND (tmp, 1); + if (DECL_FINAL (decl)) + final_assign_error (DECL_NAME (decl)); + } /* Avoid needless recursion. */