summaryrefslogtreecommitdiff
path: root/gcc/java/jcf-write.c
diff options
context:
space:
mode:
authorapbianco <apbianco@138bc75d-0d04-0410-961f-82ee72b054a4>2000-07-08 06:23:02 +0000
committerapbianco <apbianco@138bc75d-0d04-0410-961f-82ee72b054a4>2000-07-08 06:23:02 +0000
commita8e46649d4222e8cab5cde9e72045e4480a71b1c (patch)
treea008e98644f524f6d1620152f2ac0df80da2b02d /gcc/java/jcf-write.c
parent6219c3ed8afbaf2ec3829a28ed8ab0fad5aab84d (diff)
downloadgcc-a8e46649d4222e8cab5cde9e72045e4480a71b1c.tar.gz
2000-07-07 Alexandre Petit-Bianco <apbianco@cygnus.com>
* parse.y (generate_classfile): Exclude null strings. (http://gcc.gnu.org/ml/gcc-patches/2000-07/msg00233.html) git-svn-id: svn+ssh://gcc.gnu.org/svn/gcc/trunk@34923 138bc75d-0d04-0410-961f-82ee72b054a4
Diffstat (limited to 'gcc/java/jcf-write.c')
-rw-r--r--gcc/java/jcf-write.c3
1 files changed, 2 insertions, 1 deletions
diff --git a/gcc/java/jcf-write.c b/gcc/java/jcf-write.c
index 0d2a0388784..0dd17fdde93 100644
--- a/gcc/java/jcf-write.c
+++ b/gcc/java/jcf-write.c
@@ -2877,7 +2877,8 @@ generate_classfile (clas, state)
have_value = DECL_INITIAL (part) != NULL_TREE
&& FIELD_STATIC (part)
&& (TREE_CODE (DECL_INITIAL (part)) == STRING_CST
- || TREE_CODE (DECL_INITIAL (part)) == INTEGER_CST
+ || (TREE_CODE (DECL_INITIAL (part)) == INTEGER_CST
+ && !TREE_TYPE (part) == string_type_node)
|| TREE_CODE (DECL_INITIAL (part)) == REAL_CST);
if (have_value)
attr_count++;