This is the mail archive of the
mailing list for the GCC project.
Re: RFC - PR java/8608: ICE if WFL not yet set in check_init()
- From: Per Bothner <per at bothner dot com>
- To: Ranjit Mathew <rmathew at gmail dot com>
- Cc: GCJ Patches <java-patches at gcc dot gnu dot org>, GCC Patches <gcc-patches at gcc dot gnu dot org>
- Date: Wed, 09 Feb 2005 13:03:51 -0800
- Subject: Re: RFC - PR java/8608: ICE if WFL not yet set in check_init()
- References: <420A1060.email@example.com>
Ranjit Mathew wrote:
The ICE in PR java/8608 happens because WFL does
not get set before parse_error_context() and thence
issue_warning_error_from_context() is called from
The preferred fix is to is to remove parse_error_context,
and just the functions in diagnostic.c. These make use
of input_location - but note that in init-check.c only
when input_location is set, so we'd get the same line numbers
as with using parse_error_context.
However, we'd lose column numbers in the short term,
even with USE_MAPPED_LOCATION - but that's easily fixable.
The patch does not handle USE_MAPPED_LOCATION as
I am not familiar with it.
You're a smart boy - you can figure it out.
The main thing to note that if USE_MAPPED_LOCATION
build_expr_wfl that a source_location, so the code
build_expr_wfl (NULL_TREE, DECL_SOURCE_LOCATION (exp)
But since since we want to get rid of both build_expr_wfl
and parse_error_context, the better fix for USE_MAPPED_LOCATION
error ("Variable %qD may not have been initialized", exp);
If we're willing to temporarily give up line numbers,
we can use that for the non-USE_MAPPED_LOCATION as well.