diff options
author | Tom Tromey <tromey@redhat.com> | 2001-04-06 20:42:41 +0000 |
---|---|---|
committer | Tom Tromey <tromey@gcc.gnu.org> | 2001-04-06 20:42:41 +0000 |
commit | 2d9fea5d4b0ddbfb7c2ad7dc28e1fec7f5476dfc (patch) | |
tree | 4a3388be3150c05c42e1d67b257b21006ba86d41 | |
parent | 613bb86ee1f275a4f2c1b223d1e767ff05914ca2 (diff) | |
download | gcc-2d9fea5d4b0ddbfb7c2ad7dc28e1fec7f5476dfc.zip gcc-2d9fea5d4b0ddbfb7c2ad7dc28e1fec7f5476dfc.tar.gz gcc-2d9fea5d4b0ddbfb7c2ad7dc28e1fec7f5476dfc.tar.bz2 |
parse.y (analyze_clinit_body): Return true if the second operand of a METHOD_EXPR is nonzero.
* parse.y (analyze_clinit_body): Return true if the second operand
of a METHOD_EXPR is nonzero.
From-SVN: r41164
-rw-r--r-- | gcc/java/ChangeLog | 5 | ||||
-rw-r--r-- | gcc/java/parse.y | 7 |
2 files changed, 8 insertions, 4 deletions
diff --git a/gcc/java/ChangeLog b/gcc/java/ChangeLog index f6116e5..453641b 100644 --- a/gcc/java/ChangeLog +++ b/gcc/java/ChangeLog @@ -1,5 +1,10 @@ 2001-04-06 Tom Tromey <tromey@redhat.com> + * parse.y (analyze_clinit_body): Return true if the second operand + of a METHOD_EXPR is nonzero. + +2001-04-06 Tom Tromey <tromey@redhat.com> + * Make-lang.in ($(srcdir)/java/parse-scan.c): Run bison from build directory. ($(srcdir)/java/parse.c): Likewise. diff --git a/gcc/java/parse.y b/gcc/java/parse.y index 4032409..c0b9100 100644 --- a/gcc/java/parse.y +++ b/gcc/java/parse.y @@ -7546,7 +7546,7 @@ maybe_generate_pre_expand_clinit (class_type) } /* Analyzes a method body and look for something that isn't a - MODIFY_EXPR. */ + MODIFY_EXPR with a constant value. */ static int analyze_clinit_body (bbody) @@ -7570,11 +7570,10 @@ analyze_clinit_body (bbody) break; case MODIFY_EXPR: - bbody = NULL_TREE; - break; + /* Return 0 if the operand is constant, 1 otherwise. */ + return ! TREE_CONSTANT (TREE_OPERAND (bbody, 1)); default: - bbody = NULL_TREE; return 1; } return 0; |