Commit 9f617717 by H.J. Lu Committed by Jason Merrill

Makefile.in (parse.o, decl.o): Also depend on $(srcdir)/../except.h $(srcdir)/../output.h.

Mon Sep 29 19:57:51 1997  H.J. Lu  (hjl@gnu.ai.mit.edu)

	* Makefile.in (parse.o, decl.o): Also depend on
	$(srcdir)/../except.h $(srcdir)/../output.h.
	(decl2.o): Also depend on $(srcdir)/../expr.h ../insn-codes.h
	$(srcdir)/../except.h $(srcdir)/../output.h.
	(typeck.o, init.o): Also depend on $(srcdir)/../expr.h
	../insn-codes.h.

	* call.c, cp-tree.h, decl.c, tree.c: Finish prototyping.

	* expr.c (cplus_expand_expr): Make it static.

	* decl2.c, init.c, typeck.c: Include "expr.h".
	(expand_expr): Use proper values when calling the function.

From-SVN: r15801
parent 3a6eabfa
Mon Sep 29 19:57:51 1997 H.J. Lu (hjl@gnu.ai.mit.edu)
* Makefile.in (parse.o, decl.o): Also depend on
$(srcdir)/../except.h $(srcdir)/../output.h.
(decl2.o): Also depend on $(srcdir)/../expr.h ../insn-codes.h
$(srcdir)/../except.h $(srcdir)/../output.h.
(typeck.o, init.o): Also depend on $(srcdir)/../expr.h
../insn-codes.h.
* call.c, cp-tree.h, decl.c, tree.c: Finish prototyping.
* expr.c (cplus_expand_expr): Make it static.
* decl2.c, init.c, typeck.c: Include "expr.h".
(expand_expr): Use proper values when calling the function.
Mon Sep 29 11:05:54 1997 Alexandre Oliva <oliva@dcc.unicamp.br> Mon Sep 29 11:05:54 1997 Alexandre Oliva <oliva@dcc.unicamp.br>
* lang-options.h: new -Wold-style-cast flag. * lang-options.h: new -Wold-style-cast flag.
......
...@@ -197,7 +197,8 @@ CXX_TREE_H = $(TREE_H) cp-tree.h cp-tree.def ...@@ -197,7 +197,8 @@ CXX_TREE_H = $(TREE_H) cp-tree.h cp-tree.def
PARSE_H = $(srcdir)/parse.h PARSE_H = $(srcdir)/parse.h
PARSE_C = $(srcdir)/parse.c PARSE_C = $(srcdir)/parse.c
parse.o : $(PARSE_C) $(CONFIG_H) $(CXX_TREE_H) $(srcdir)/../flags.h lex.h parse.o : $(PARSE_C) $(CONFIG_H) $(CXX_TREE_H) $(srcdir)/../flags.h lex.h \
$(srcdir)/../except.h $(srcdir)/../output.h
$(CC) -c $(ALL_CFLAGS) $(ALL_CPPFLAGS) $(INCLUDES) $(BIG_SWITCHFLAG) \ $(CC) -c $(ALL_CFLAGS) $(ALL_CPPFLAGS) $(INCLUDES) $(BIG_SWITCHFLAG) \
`echo $(PARSE_C) | sed 's,^\./,,'` `echo $(PARSE_C) | sed 's,^\./,,'`
...@@ -230,15 +231,19 @@ spew.o : spew.c $(CONFIG_H) $(CXX_TREE_H) \ ...@@ -230,15 +231,19 @@ spew.o : spew.c $(CONFIG_H) $(CXX_TREE_H) \
lex.o : lex.c $(CONFIG_H) $(CXX_TREE_H) \ lex.o : lex.c $(CONFIG_H) $(CXX_TREE_H) \
$(PARSE_H) input.c $(srcdir)/../flags.h hash.h lex.h $(srcdir)/../c-pragma.h $(PARSE_H) input.c $(srcdir)/../flags.h hash.h lex.h $(srcdir)/../c-pragma.h
decl.o : decl.c $(CONFIG_H) $(CXX_TREE_H) $(srcdir)/../flags.h \ decl.o : decl.c $(CONFIG_H) $(CXX_TREE_H) $(srcdir)/../flags.h \
lex.h decl.h $(srcdir)/../stack.h lex.h decl.h $(srcdir)/../stack.h $(srcdir)/../output.h \
$(srcdir)/../except.h
decl2.o : decl2.c $(CONFIG_H) $(CXX_TREE_H) $(srcdir)/../flags.h \ decl2.o : decl2.c $(CONFIG_H) $(CXX_TREE_H) $(srcdir)/../flags.h \
lex.h decl.h lex.h decl.h $(srcdir)/../expr.h ../insn-codes.h $(srcdir)/../except.h \
$(srcdir)/../output.h $(srcdir)/../except.h
typeck2.o : typeck2.c $(CONFIG_H) $(CXX_TREE_H) $(srcdir)/../flags.h typeck2.o : typeck2.c $(CONFIG_H) $(CXX_TREE_H) $(srcdir)/../flags.h
typeck.o : typeck.c $(CONFIG_H) $(CXX_TREE_H) $(srcdir)/../flags.h $(RTL_H) typeck.o : typeck.c $(CONFIG_H) $(CXX_TREE_H) $(srcdir)/../flags.h $(RTL_H) \
$(srcdir)/../expr.h ../insn-codes.h
class.o : class.c $(CONFIG_H) $(CXX_TREE_H) $(srcdir)/../flags.h class.o : class.c $(CONFIG_H) $(CXX_TREE_H) $(srcdir)/../flags.h
call.o : call.c $(CONFIG_H) $(CXX_TREE_H) $(srcdir)/../flags.h class.h call.o : call.c $(CONFIG_H) $(CXX_TREE_H) $(srcdir)/../flags.h class.h
friend.o : friend.c $(CONFIG_H) $(CXX_TREE_H) $(srcdir)/../flags.h $(RTL_H) friend.o : friend.c $(CONFIG_H) $(CXX_TREE_H) $(srcdir)/../flags.h $(RTL_H)
init.o : init.c $(CONFIG_H) $(CXX_TREE_H) $(srcdir)/../flags.h $(RTL_H) init.o : init.c $(CONFIG_H) $(CXX_TREE_H) $(srcdir)/../flags.h $(RTL_H) \
$(srcdir)/../expr.h ../insn-codes.h
method.o : method.c $(CONFIG_H) $(CXX_TREE_H) class.h method.o : method.c $(CONFIG_H) $(CXX_TREE_H) class.h
cvt.o : cvt.c $(CONFIG_H) $(CXX_TREE_H) class.h cvt.o : cvt.c $(CONFIG_H) $(CXX_TREE_H) class.h
search.o : search.c $(CONFIG_H) $(CXX_TREE_H) $(srcdir)/../stack.h $(srcdir)/../flags.h search.o : search.c $(CONFIG_H) $(CXX_TREE_H) $(srcdir)/../stack.h $(srcdir)/../flags.h
......
...@@ -102,6 +102,7 @@ static tree non_reference PROTO((tree)); ...@@ -102,6 +102,7 @@ static tree non_reference PROTO((tree));
static tree build_conv PROTO((enum tree_code, tree, tree)); static tree build_conv PROTO((enum tree_code, tree, tree));
static void print_n_candidates PROTO((struct candidate *, int)); static void print_n_candidates PROTO((struct candidate *, int));
static tree default_parm_conversions PROTO((tree, tree *)); static tree default_parm_conversions PROTO((tree, tree *));
static int is_subseq PROTO((tree, tree));
#define EVIL_RETURN(ARG) ((ARG).code = EVIL_CODE, (ARG)) #define EVIL_RETURN(ARG) ((ARG).code = EVIL_CODE, (ARG))
#define STD_RETURN(ARG) ((ARG).code = STD_CODE, (ARG)) #define STD_RETURN(ARG) ((ARG).code = STD_CODE, (ARG))
......
...@@ -2204,7 +2204,6 @@ extern void expand_throw PROTO((tree)); ...@@ -2204,7 +2204,6 @@ extern void expand_throw PROTO((tree));
extern tree build_throw PROTO((tree)); extern tree build_throw PROTO((tree));
/* in expr.c */ /* in expr.c */
/* skip cplus_expand_expr */
extern void init_cplus_expand PROTO((void)); extern void init_cplus_expand PROTO((void));
extern void fixup_result_decl PROTO((tree, struct rtx_def *)); extern void fixup_result_decl PROTO((tree, struct rtx_def *));
extern int extract_init PROTO((tree, tree)); extern int extract_init PROTO((tree, tree));
...@@ -2289,6 +2288,7 @@ extern tree snarf_defarg PROTO((void)); ...@@ -2289,6 +2288,7 @@ extern tree snarf_defarg PROTO((void));
extern void add_defarg_fn PROTO((tree)); extern void add_defarg_fn PROTO((tree));
extern void do_pending_defargs PROTO((void)); extern void do_pending_defargs PROTO((void));
extern int identifier_type PROTO((tree)); extern int identifier_type PROTO((tree));
extern void yyhook PROTO((int));
/* in method.c */ /* in method.c */
extern void init_method PROTO((void)); extern void init_method PROTO((void));
......
...@@ -42,6 +42,14 @@ Boston, MA 02111-1307, USA. */ ...@@ -42,6 +42,14 @@ Boston, MA 02111-1307, USA. */
#include "output.h" #include "output.h"
#include "except.h" #include "except.h"
#ifdef HAVE_STDLIB_H
#include <stdlib.h>
#endif
#ifdef NEED_DECLARATION_FREE
extern void free PROTO((void *));
#endif
#define obstack_chunk_alloc xmalloc #define obstack_chunk_alloc xmalloc
#define obstack_chunk_free free #define obstack_chunk_free free
......
...@@ -37,8 +37,7 @@ Boston, MA 02111-1307, USA. */ ...@@ -37,8 +37,7 @@ Boston, MA 02111-1307, USA. */
#include "lex.h" #include "lex.h"
#include "output.h" #include "output.h"
#include "except.h" #include "except.h"
#include "expr.h"
extern tree get_file_function_name ();
#ifdef HAVE_STDLIB_H #ifdef HAVE_STDLIB_H
#include <stdlib.h> #include <stdlib.h>
...@@ -3130,7 +3129,7 @@ finish_file () ...@@ -3130,7 +3129,7 @@ finish_file ()
expand_expr (expand_vec_init (decl, TREE_VEC_ELT (init, 0), expand_expr (expand_vec_init (decl, TREE_VEC_ELT (init, 0),
TREE_VEC_ELT (init, 1), TREE_VEC_ELT (init, 1),
TREE_VEC_ELT (init, 2), 0), TREE_VEC_ELT (init, 2), 0),
const0_rtx, VOIDmode, 0); const0_rtx, VOIDmode, EXPAND_NORMAL);
} }
else else
expand_assignment (decl, init, 0, 0); expand_assignment (decl, init, 0, 0);
......
...@@ -30,10 +30,12 @@ Boston, MA 02111-1307, USA. */ ...@@ -30,10 +30,12 @@ Boston, MA 02111-1307, USA. */
static tree extract_aggr_init PROTO((tree, tree)); static tree extract_aggr_init PROTO((tree, tree));
static tree extract_scalar_init PROTO((tree, tree)); static tree extract_scalar_init PROTO((tree, tree));
static rtx cplus_expand_expr PROTO((tree, rtx, enum machine_mode,
enum expand_modifier));
/* Hook used by expand_expr to expand language-specific tree codes. */ /* Hook used by expand_expr to expand language-specific tree codes. */
rtx static rtx
cplus_expand_expr (exp, target, tmode, modifier) cplus_expand_expr (exp, target, tmode, modifier)
tree exp; tree exp;
rtx target; rtx target;
......
...@@ -29,6 +29,7 @@ Boston, MA 02111-1307, USA. */ ...@@ -29,6 +29,7 @@ Boston, MA 02111-1307, USA. */
#include "flags.h" #include "flags.h"
#include "output.h" #include "output.h"
#include "except.h" #include "except.h"
#include "expr.h"
extern void compiler_error (); extern void compiler_error ();
...@@ -1433,7 +1434,7 @@ expand_aggr_init_1 (binfo, true_exp, exp, init, alias_this, flags) ...@@ -1433,7 +1434,7 @@ expand_aggr_init_1 (binfo, true_exp, exp, init, alias_this, flags)
/* Unify the initialization targets. */ /* Unify the initialization targets. */
DECL_RTL (TREE_OPERAND (init, 0)) = DECL_RTL (exp); DECL_RTL (TREE_OPERAND (init, 0)) = DECL_RTL (exp);
else else
DECL_RTL (TREE_OPERAND (init, 0)) = expand_expr (exp, NULL_RTX, VOIDmode, 0); DECL_RTL (TREE_OPERAND (init, 0)) = expand_expr (exp, NULL_RTX, VOIDmode, EXPAND_NORMAL);
expand_expr_stmt (init); expand_expr_stmt (init);
return; return;
...@@ -1472,7 +1473,7 @@ expand_aggr_init_1 (binfo, true_exp, exp, init, alias_this, flags) ...@@ -1472,7 +1473,7 @@ expand_aggr_init_1 (binfo, true_exp, exp, init, alias_this, flags)
if (exp == DECL_RESULT (current_function_decl)) if (exp == DECL_RESULT (current_function_decl))
DECL_INITIAL (exp) = init; DECL_INITIAL (exp) = init;
TREE_SIDE_EFFECTS (init) = 1; TREE_SIDE_EFFECTS (init) = 1;
expand_expr (init, const0_rtx, VOIDmode, 0); expand_expr (init, const0_rtx, VOIDmode, EXPAND_NORMAL);
free_temp_slots (); free_temp_slots ();
return; return;
} }
...@@ -2649,7 +2650,7 @@ build_new (placement, decl, init, use_global_new) ...@@ -2649,7 +2650,7 @@ build_new (placement, decl, init, use_global_new)
do_pending_stack_adjust (); do_pending_stack_adjust ();
start_sequence_for_rtl_expr (xval); start_sequence_for_rtl_expr (xval);
emit_note (0, -1); emit_note (0, -1);
rtxval = expand_expr (alloc_expr, NULL_RTX, VOIDmode, 0); rtxval = expand_expr (alloc_expr, NULL_RTX, VOIDmode, EXPAND_NORMAL);
do_pending_stack_adjust (); do_pending_stack_adjust ();
TREE_SIDE_EFFECTS (xval) = 1; TREE_SIDE_EFFECTS (xval) = 1;
RTL_EXPR_SEQUENCE (xval) = get_insns (); RTL_EXPR_SEQUENCE (xval) = get_insns ();
...@@ -3107,7 +3108,7 @@ expand_vec_init (decl, base, maxindex, init, from_array) ...@@ -3107,7 +3108,7 @@ expand_vec_init (decl, base, maxindex, init, from_array)
(rval, (rval,
build_binary_op (MINUS_EXPR, maxindex, iterator, 1), build_binary_op (MINUS_EXPR, maxindex, iterator, 1),
type); type);
expand_expr (e1, const0_rtx, VOIDmode, 0); expand_expr (e1, const0_rtx, VOIDmode, EXPAND_NORMAL);
RTL_EXPR_SEQUENCE (cleanup) = get_insns (); RTL_EXPR_SEQUENCE (cleanup) = get_insns ();
end_sequence (); end_sequence ();
......
...@@ -32,6 +32,14 @@ Boston, MA 02111-1307, USA. */ ...@@ -32,6 +32,14 @@ Boston, MA 02111-1307, USA. */
#include <varargs.h> #include <varargs.h>
#endif #endif
#ifdef HAVE_STDLIB_H
#include <stdlib.h>
#endif
#ifdef NEED_DECLARATION_FREE
extern void free PROTO((void *));
#endif
extern void compiler_error (); extern void compiler_error ();
static tree get_identifier_list PROTO((tree)); static tree get_identifier_list PROTO((tree));
......
...@@ -36,6 +36,7 @@ Boston, MA 02111-1307, USA. */ ...@@ -36,6 +36,7 @@ Boston, MA 02111-1307, USA. */
#include "cp-tree.h" #include "cp-tree.h"
#include "flags.h" #include "flags.h"
#include "output.h" #include "output.h"
#include "expr.h"
#ifdef HAVE_STRING_H #ifdef HAVE_STRING_H
#include <string.h> #include <string.h>
...@@ -5645,7 +5646,7 @@ expand_target_expr (t) ...@@ -5645,7 +5646,7 @@ expand_target_expr (t)
do_pending_stack_adjust (); do_pending_stack_adjust ();
start_sequence_for_rtl_expr (xval); start_sequence_for_rtl_expr (xval);
emit_note (0, -1); emit_note (0, -1);
rtxval = expand_expr (t, NULL_RTX, VOIDmode, 0); rtxval = expand_expr (t, NULL_RTX, VOIDmode, EXPAND_NORMAL);
do_pending_stack_adjust (); do_pending_stack_adjust ();
TREE_SIDE_EFFECTS (xval) = 1; TREE_SIDE_EFFECTS (xval) = 1;
RTL_EXPR_SEQUENCE (xval) = get_insns (); RTL_EXPR_SEQUENCE (xval) = get_insns ();
...@@ -7119,7 +7120,7 @@ c_expand_asm_operands (string, outputs, inputs, clobbers, vol, filename, line) ...@@ -7119,7 +7120,7 @@ c_expand_asm_operands (string, outputs, inputs, clobbers, vol, filename, line)
if (o[i] != TREE_VALUE (tail)) if (o[i] != TREE_VALUE (tail))
{ {
expand_expr (build_modify_expr (o[i], NOP_EXPR, TREE_VALUE (tail)), expand_expr (build_modify_expr (o[i], NOP_EXPR, TREE_VALUE (tail)),
const0_rtx, VOIDmode, 0); const0_rtx, VOIDmode, EXPAND_NORMAL);
free_temp_slots (); free_temp_slots ();
} }
/* Detect modification of read-only values. /* Detect modification of read-only values.
......
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