Commit a62e870c by Mark Mitchell Committed by Mark Mitchell

c-common.c (declare_hidden_char_array): Use TYPE_DOMAIN to get the length of an…

c-common.c (declare_hidden_char_array): Use TYPE_DOMAIN to get the length of an array, not TREE_TYPE.

1998-04-15  Mark Mitchell  <mmitchell@usa.net>
	* c-common.c (declare_hidden_char_array): Use TYPE_DOMAIN to get
	the length of an array, not TREE_TYPE.

From-SVN: r19233
parent 5e89e58b
1998-04-15 Mark Mitchell <mmitchell@usa.net>
* c-common.c (declare_hidden_char_array): Use TYPE_DOMAIN to get
the length of an array, not TREE_TYPE.
Wed Apr 15 15:31:34 1998 Jeffrey A Law (law@cygnus.com) Wed Apr 15 15:31:34 1998 Jeffrey A Law (law@cygnus.com)
* flow.c (sbitmap_union_of_successors): New function. * flow.c (sbitmap_union_of_successors): New function.
......
...@@ -181,7 +181,7 @@ declare_hidden_char_array (name, value) ...@@ -181,7 +181,7 @@ declare_hidden_char_array (name, value)
or if we want to give warnings for large objects, make a bigger one. */ or if we want to give warnings for large objects, make a bigger one. */
vlen = strlen (value) + 1; vlen = strlen (value) + 1;
type = char_array_type_node; type = char_array_type_node;
if (TREE_INT_CST_LOW (TYPE_MAX_VALUE (TREE_TYPE (type))) < vlen if (TREE_INT_CST_LOW (TYPE_MAX_VALUE (TYPE_DOMAIN (type))) < vlen
|| warn_larger_than) || warn_larger_than)
type = build_array_type (char_type_node, type = build_array_type (char_type_node,
build_index_type (build_int_2 (vlen, 0))); build_index_type (build_int_2 (vlen, 0)));
......
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