java-tree.h (DECL_LOCAL_FINAL_IUD): New macro to test if a local variable was initial...
authorRanjit Mathew <rmathew@hotmail.com>
Sat, 29 May 2004 05:11:41 +0000 (05:11 +0000)
committerRanjit Mathew <rmathew@gcc.gnu.org>
Sat, 29 May 2004 05:11:41 +0000 (05:11 +0000)
commitedf74484b2277d89da3d02da5ed694fd6fb0716f
treefa7c6c430b62609bd2e6979cf8f506515595ec7f
parent27e1a8d2eebf19730394a178567c775dd39ac248
java-tree.h (DECL_LOCAL_FINAL_IUD): New macro to test if a local variable was initialised upon declaration.

* java-tree.h (DECL_LOCAL_FINAL_IUD): New macro to test if a
local variable was initialised upon declaration.
* parse.y (declare_local_variables): Set DECL_LOCAL_FINAL_IUD if
variable was final and initialised upon declaration.
* check-init.c (check_final_reassigned): Give error only if a blank
final is not definitely unassigned or if an initialised final is
reassigned.
(check_bool_init): Respect JLS2 16.1.7 requirements for boolean
assignment expressions. Remove case MODIFY_EXPR, label do_default.
(check_init): Perform initialised-variable-removing-optimisation
only on non-final local variables.

Co-Authored-By: Per Bothner <per@bothner.com>
From-SVN: r82416
gcc/java/ChangeLog
gcc/java/check-init.c
gcc/java/java-tree.h
gcc/java/parse.y