Commit 273cf2e4 by Zack Weinberg Committed by Zack Weinberg

c-typeck.c (digest_init): Remove unused parameter; all callers changed.

	* c-typeck.c (digest_init): Remove unused parameter; all
	callers changed.

From-SVN: r50118
parent ffde6675
2002-02-27 Zack Weinberg <zack@codesourcery.com>
* c-typeck.c (digest_init): Remove unused parameter; all
callers changed.
2002-02-27 Geoffrey Keating <geoffk@redhat.com> 2002-02-27 Geoffrey Keating <geoffk@redhat.com>
* expmed.c (expand_shift): Correctly test for low part of a * expmed.c (expand_shift): Correctly test for low part of a
......
...@@ -73,7 +73,7 @@ static void push_array_bounds PARAMS ((int)); ...@@ -73,7 +73,7 @@ static void push_array_bounds PARAMS ((int));
static int spelling_length PARAMS ((void)); static int spelling_length PARAMS ((void));
static char *print_spelling PARAMS ((char *)); static char *print_spelling PARAMS ((char *));
static void warning_init PARAMS ((const char *)); static void warning_init PARAMS ((const char *));
static tree digest_init PARAMS ((tree, tree, int, int)); static tree digest_init PARAMS ((tree, tree, int));
static void output_init_element PARAMS ((tree, tree, tree, int)); static void output_init_element PARAMS ((tree, tree, tree, int));
static void output_pending_init_elements PARAMS ((int)); static void output_pending_init_elements PARAMS ((int));
static int set_designator PARAMS ((int)); static int set_designator PARAMS ((int));
...@@ -3659,8 +3659,7 @@ build_c_cast (type, expr) ...@@ -3659,8 +3659,7 @@ build_c_cast (type, expr)
else else
name = ""; name = "";
t = digest_init (type, build (CONSTRUCTOR, type, NULL_TREE, t = digest_init (type, build (CONSTRUCTOR, type, NULL_TREE,
build_tree_list (field, value)), build_tree_list (field, value)), 0);
0, 0);
TREE_CONSTANT (t) = TREE_CONSTANT (value); TREE_CONSTANT (t) = TREE_CONSTANT (value);
return t; return t;
} }
...@@ -4345,8 +4344,7 @@ store_init_value (decl, init) ...@@ -4345,8 +4344,7 @@ store_init_value (decl, init)
/* Digest the specified initializer into an expression. */ /* Digest the specified initializer into an expression. */
value = digest_init (type, init, TREE_STATIC (decl), value = digest_init (type, init, TREE_STATIC (decl));
TREE_STATIC (decl) || (pedantic && !flag_isoc99));
/* Store the expression if valid; else report error. */ /* Store the expression if valid; else report error. */
...@@ -4607,14 +4605,13 @@ warning_init (msgid) ...@@ -4607,14 +4605,13 @@ warning_init (msgid)
/* Digest the parser output INIT as an initializer for type TYPE. /* Digest the parser output INIT as an initializer for type TYPE.
Return a C expression of type TYPE to represent the initial value. Return a C expression of type TYPE to represent the initial value.
The arguments REQUIRE_CONSTANT and CONSTRUCTOR_CONSTANT request errors REQUIRE_CONSTANT requests an error if non-constant initializers or
if non-constant initializers or elements are seen. CONSTRUCTOR_CONSTANT elements are seen. */
applies only to elements of constructors. */
static tree static tree
digest_init (type, init, require_constant, constructor_constant) digest_init (type, init, require_constant)
tree type, init; tree type, init;
int require_constant, constructor_constant; int require_constant;
{ {
enum tree_code code = TREE_CODE (type); enum tree_code code = TREE_CODE (type);
tree inside_init = init; tree inside_init = init;
...@@ -6189,8 +6186,7 @@ output_init_element (value, type, field, pending) ...@@ -6189,8 +6186,7 @@ output_init_element (value, type, field, pending)
|| TREE_CHAIN (field))))) || TREE_CHAIN (field)))))
return; return;
value = digest_init (type, value, require_constant_value, value = digest_init (type, value, require_constant_value);
require_constant_elements);
if (value == error_mark_node) if (value == error_mark_node)
{ {
constructor_erroneous = 1; constructor_erroneous = 1;
......
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