2
0
mirror of git://gcc.gnu.org/git/gcc.git synced 2024-12-22 00:59:55 +08:00

parse.y (patch_unaryop): Fix ++ operator check on array references.

Mon Apr 12 18:27:32 1999  Alexandre Petit-Bianco  <apbianco@cygnus.com>
	* parse.y (patch_unaryop): Fix ++ operator check on array
 	references.

From-SVN: r26382
This commit is contained in:
Alexandre Petit-Bianco 1999-04-12 18:32:22 +00:00 committed by Alexandre Petit-Bianco
parent 808ce120ae
commit b3edebcf49
3 changed files with 18 additions and 6 deletions

View File

@ -1,3 +1,8 @@
Mon Apr 12 18:27:32 1999 Alexandre Petit-Bianco <apbianco@cygnus.com>
* parse.y (patch_unaryop): Fix ++ operator check on array
references.
Tue Apr 6 23:15:52 1999 Jeffrey A Law (law@cygnus.com)
* Makefile.in (TREE_H): Add tree-check.h.

View File

@ -12344,9 +12344,12 @@ patch_unaryop (node, wfl_op)
case PREDECREMENT_EXPR:
decl = strip_out_static_field_access_decl (op);
if (!JDECL_P (decl)
&& !((TREE_CODE (decl) == INDIRECT_REF
|| TREE_CODE (decl) == COMPONENT_REF)
&& JPRIMITIVE_TYPE_P (TREE_TYPE (decl))))
&& TREE_CODE (decl) != COMPONENT_REF
&& !(flag_emit_class_files && TREE_CODE (decl) == ARRAY_REF)
&& TREE_CODE (decl) != INDIRECT_REF
&& !(TREE_CODE (decl) == COMPOUND_EXPR
&& TREE_OPERAND (decl, 1)
&& (TREE_CODE (TREE_OPERAND (decl, 1)) == INDIRECT_REF)))
{
tree lvalue;
/* Before screaming, check that we're not in fact trying to

View File

@ -9742,10 +9742,14 @@ patch_unaryop (node, wfl_op)
/* 15.14.2 Prefix Decrement Operator -- */
case PREDECREMENT_EXPR:
decl = strip_out_static_field_access_decl (op);
/* We really should have a JAVA_ARRAY_EXPR to avoid this */
if (!JDECL_P (decl)
&& !((TREE_CODE (decl) == INDIRECT_REF
|| TREE_CODE (decl) == COMPONENT_REF)
&& JPRIMITIVE_TYPE_P (TREE_TYPE (decl))))
&& TREE_CODE (decl) != COMPONENT_REF
&& !(flag_emit_class_files && TREE_CODE (decl) == ARRAY_REF)
&& TREE_CODE (decl) != INDIRECT_REF
&& !(TREE_CODE (decl) == COMPOUND_EXPR
&& TREE_OPERAND (decl, 1)
&& (TREE_CODE (TREE_OPERAND (decl, 1)) == INDIRECT_REF)))
{
tree lvalue;
/* Before screaming, check that we're not in fact trying to