Patch: PR 5941

Per Bothner per@bothner.com
Thu Apr 25 12:08:00 GMT 2002


Tom Tromey wrote:
>>>>>>"Per" == Per Bothner <per@bothner.com> writes:
>>>>>
> 
> Per> I 'm not sure FORCED_REACHABLE_EXPR_P is a great name.
> Per> We're not forcing it to be reachable, since that would
> Per> means than any following statements should also be forced to be
> Per> reachable.  Instead, I'd call it something like
> Per> SUPRESS_UNREACHABLE_ERROR - and still emit a warning.
> 
> How's this?
> 
> This changes the macro name to SUPRESS_UNREACHABLE_ERROR.
> It emits a warning, except when pedantic, in which case it prints
> nothing (because pedantically the code in question is 100% correct).

This is good, but I'm not sure it's safe.  At least you
need to change some comments:  Whenever you use a
new TREE_LANG_FLAG_0, you must check and update the
"Usage of TREE_LANG_FLAG_?" at the beginning of java-tree.h.
If you do that, you will see that TREE_LANG_FLAG_0 has a number
of existing uses.  You say SUPPRESS_UNREACHABLE_ERROR can be
used for "some kind of EXPR, but not a WFL", which conflicts
with (at least) LOOP_EXPR.  Now, you're got going to use it
for LOOP_EXPR, so in practice I guess it's safe.  However, the
comments need to be fixed.
-- 
	--Per Bothner
per@bothner.com   http://www.bothner.com/per/



More information about the Gcc-patches mailing list