Commit 0d504ef0 by Nathan Sidwell Committed by Nathan Sidwell

cp-tree.h (build_component_addr): Remove prototype.

	* cp-tree.h (build_component_addr): Remove prototype.
	* typeck.c (build_component_addr): Make static. Remove MSG
	argument.
	(build_component_addr): Remove MSG parameter, clean up
	comment.
	(build_x_function_call): Use cp_error.
	(build_unary_op): Adjust call of build_component_addr.

From-SVN: r26686
parent 9dd2b100
1999-04-28 Nathan Sidwell <nathan@acm.org>
* cp-tree.h (build_component_addr): Remove prototype.
* typeck.c (build_component_addr): Make static. Remove MSG
argument.
(build_component_addr): Remove MSG parameter, clean up
comment.
(build_x_function_call): Use cp_error.
(build_unary_op): Adjust call of build_component_addr.
Wed Apr 28 11:42:22 1999 Andreas Schwab <schwab@issan.cs.uni-dortmund.de> Wed Apr 28 11:42:22 1999 Andreas Schwab <schwab@issan.cs.uni-dortmund.de>
* search.c (binfo_for_vtable): Initialize bfvi.var. * search.c (binfo_for_vtable): Initialize bfvi.var.
......
...@@ -3441,7 +3441,6 @@ extern tree convert_arguments PROTO((tree, tree, tree, int)); ...@@ -3441,7 +3441,6 @@ extern tree convert_arguments PROTO((tree, tree, tree, int));
extern tree build_x_binary_op PROTO((enum tree_code, tree, tree)); extern tree build_x_binary_op PROTO((enum tree_code, tree, tree));
extern tree build_binary_op PROTO((enum tree_code, tree, tree)); extern tree build_binary_op PROTO((enum tree_code, tree, tree));
extern tree build_binary_op_nodefault PROTO((enum tree_code, tree, tree, enum tree_code)); extern tree build_binary_op_nodefault PROTO((enum tree_code, tree, tree, enum tree_code));
extern tree build_component_addr PROTO((tree, tree, const char *));
extern tree build_x_unary_op PROTO((enum tree_code, tree)); extern tree build_x_unary_op PROTO((enum tree_code, tree));
extern tree build_unary_op PROTO((enum tree_code, tree, int)); extern tree build_unary_op PROTO((enum tree_code, tree, int));
extern tree unary_complex_lvalue PROTO((enum tree_code, tree)); extern tree unary_complex_lvalue PROTO((enum tree_code, tree));
......
...@@ -55,6 +55,7 @@ static tree convert_sequence PROTO((tree, tree)); ...@@ -55,6 +55,7 @@ static tree convert_sequence PROTO((tree, tree));
#endif #endif
static tree lookup_anon_field PROTO((tree, tree)); static tree lookup_anon_field PROTO((tree, tree));
static tree pointer_diff PROTO((tree, tree, tree)); static tree pointer_diff PROTO((tree, tree, tree));
static tree build_component_addr PROTO((tree, tree));
static tree qualify_type PROTO((tree, tree)); static tree qualify_type PROTO((tree, tree));
static tree get_delta_difference PROTO((tree, tree, int)); static tree get_delta_difference PROTO((tree, tree, int));
static int comp_cv_target_types PROTO((tree, tree, int)); static int comp_cv_target_types PROTO((tree, tree, int));
...@@ -2687,8 +2688,7 @@ build_x_function_call (function, params, decl) ...@@ -2687,8 +2688,7 @@ build_x_function_call (function, params, decl)
{ {
if (current_class_type == NULL_TREE) if (current_class_type == NULL_TREE)
{ {
error ("object missing in call to method `%s'", cp_error ("object missing in call to method `%D'", function);
IDENTIFIER_POINTER (function));
return error_mark_node; return error_mark_node;
} }
/* Yow: call from a static member function. */ /* Yow: call from a static member function. */
...@@ -4244,17 +4244,14 @@ pointer_diff (op0, op1, ptrtype) ...@@ -4244,17 +4244,14 @@ pointer_diff (op0, op1, ptrtype)
} }
/* Handle the case of taking the address of a COMPONENT_REF. /* Handle the case of taking the address of a COMPONENT_REF.
Called by `build_unary_op' and `build_up_reference'. Called by `build_unary_op'.
ARG is the COMPONENT_REF whose address we want. ARG is the COMPONENT_REF whose address we want.
ARGTYPE is the pointer type that this address should have. ARGTYPE is the pointer type that this address should have. */
MSG is an error message to print if this COMPONENT_REF is not
addressable (such as a bitfield). */
tree static tree
build_component_addr (arg, argtype, msg) build_component_addr (arg, argtype)
tree arg, argtype; tree arg, argtype;
const char *msg;
{ {
tree field = TREE_OPERAND (arg, 1); tree field = TREE_OPERAND (arg, 1);
tree basetype = decl_type_context (field); tree basetype = decl_type_context (field);
...@@ -4264,7 +4261,8 @@ build_component_addr (arg, argtype, msg) ...@@ -4264,7 +4261,8 @@ build_component_addr (arg, argtype, msg)
if (DECL_C_BIT_FIELD (field)) if (DECL_C_BIT_FIELD (field))
{ {
error (msg, IDENTIFIER_POINTER (DECL_NAME (field))); cp_error ("attempt to take address of bit-field structure member `%D'",
field);
return error_mark_node; return error_mark_node;
} }
...@@ -4749,9 +4747,7 @@ build_unary_op (code, xarg, noconvert) ...@@ -4749,9 +4747,7 @@ build_unary_op (code, xarg, noconvert)
tree addr; tree addr;
if (TREE_CODE (arg) == COMPONENT_REF) if (TREE_CODE (arg) == COMPONENT_REF)
addr = build_component_addr addr = build_component_addr (arg, argtype);
(arg, argtype,
"attempt to take address of bit-field structure member `%s'");
else else
addr = build1 (ADDR_EXPR, argtype, arg); addr = build1 (ADDR_EXPR, argtype, arg);
......
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