Commit 2f2bd00a by Alexandre Petit-Bianco Committed by Alexandre Petit-Bianco

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
parent aaaf7848
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
ConstantValue attribute and the initial value constant pool index
on string constants.
......
......@@ -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++;
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment