Parser bug

MoT Sebastien.Villemot@ens.fr
Sun Apr 11 12:30:00 GMT 1999


Hello,
Here is a little patch that *seems* to fix the problem I've reported.
However I'm new to egcs/gcj hacking so I could be missing important
things. So check twice my changes... :)
It should correct two problems:
* when flag_emit_class_files is set, patch_array_ref() doesn't modify the
code field of an ARRAY_REF; it is the reason why an ARRAY_REF should be
accepted as a valid argument to any plusplus-like operator.
* when flag_emit_class_files is not set, and if the array index is
considered to have side effects (which is the case if the index is a
variable...), the ARRAY_REF is replaced by a COMPOUND_EXPR by
patch_array_ref(). The patch simply moves the plusplus-like operator on
the second statement of the COMPOUND_EXPR, and applies patch_unaryop
recursively.
Hope it can help,
	MoT
Changelog entry:
1999年04月11日 MoT le Vilain <Sebastien.Villemot@ens.fr>
	* parse.y (patch_unaryop): Corrected handling of array references.


More information about the Java mailing list

AltStyle によって変換されたページ (->オリジナル) /