This is the mail archive of the
java-prs@gcc.gnu.org
mailing list for the Java project.
[Bug java/18147] Objects in instance initializer blocks are scoped too widely
- From: "tromey at gcc dot gnu dot org" <gcc-bugzilla at gcc dot gnu dot org>
- To: java-prs at gcc dot gnu dot org
- Date: 25 Oct 2004 18:55:25 -0000
- Subject: [Bug java/18147] Objects in instance initializer blocks are scoped too widely
- References: <20041025184625.18147.csm@gnu.org>
- Reply-to: gcc-bugzilla at gcc dot gnu dot org
------- Additional Comments From tromey at gcc dot gnu dot org 2004-10-25 18:55 -------
As a workaround you can put an extra block inside the
instance initializers:
{{ Object foo = ... }}
The bug here seems to be that gcj chains the statements
of each initializer block together when making finit.
Instead, however, it should treat each as a separate
block and chain the blocks together. That is, an
instance initializer block introduces a new scope.
--
What |Removed |Added
----------------------------------------------------------------------------
Keywords|rejects-valid |
http://gcc.gnu.org/bugzilla/show_bug.cgi?id=18147