This is the mail archive of the
gcc-patches@gcc.gnu.org
mailing list for the GCC project.
Re: [patch] Java definite assignment
On 06-Feb-2001, Alexandre Petit-Bianco <apbianco@cygnus.com> wrote:
>
> Per Bothner writes:
>
> > Without this patch gcj complains that
> > "Variable `xx' may not have been initialized":
>
> Any ideas on how we could have
>
> String x; try { x = new String (); } finally {} x.toString ();
>
> not to report a similar error message?
Surely it *should* issue an error message in that case.
If `new String ()' throws an exception (e.g. because we're
out of memory), then `x' will never get explicitly initialized.
(Is there something I'm missing here?)
--
Fergus Henderson <fjh@cs.mu.oz.au> | "I have always known that the pursuit
| of excellence is a lethal habit"
WWW: <http://www.cs.mu.oz.au/~fjh> | -- the last words of T. S. Garp.