parse.y (generate_classfile): Exclude null strings.

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)

From-SVN: r34923
This commit is contained in:
Alexandre Petit-Bianco 2000-07-08 06:23:02 +00:00 committed by Alexandre Petit-Bianco
parent aaaf7848cd
commit 2f2bd00a8f
2 changed files with 6 additions and 1 deletions

View File

@ -1,3 +1,7 @@
2000-07-07 Alexandre Petit-Bianco <apbianco@cygnus.com>
* parse.y (generate_classfile): Exclude null strings.
2000-07-07 Alexandre Petit-Bianco <apbianco@cygnus.com>
* jcf-write.c (generate_classfile): Properly install the

View File

@ -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++;