summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--gcc/ChangeLog8
-rw-r--r--gcc/ada/ChangeLog4
-rw-r--r--gcc/ada/utils.c2
-rw-r--r--gcc/c-decl.c2
-rw-r--r--gcc/coverage.c2
-rw-r--r--gcc/cp/ChangeLog5
-rw-r--r--gcc/cp/semantics.c2
-rw-r--r--gcc/f/ChangeLog4
-rw-r--r--gcc/f/com.c2
-rw-r--r--gcc/function.c17
-rw-r--r--gcc/java/ChangeLog9
-rw-r--r--gcc/java/class.c12
-rw-r--r--gcc/java/decl.c2
-rw-r--r--gcc/java/parse.y2
-rw-r--r--gcc/java/resource.c5
-rw-r--r--gcc/tree.h2
-rw-r--r--gcc/treelang/ChangeLog5
-rw-r--r--gcc/treelang/treetree.c2
18 files changed, 57 insertions, 30 deletions
diff --git a/gcc/ChangeLog b/gcc/ChangeLog
index 7c40573ec9e..ba28ad2a5c5 100644
--- a/gcc/ChangeLog
+++ b/gcc/ChangeLog
@@ -1,3 +1,11 @@
+2003-06-20 Nathan Sidwell <nathan@codesourcery.com>
+
+ * tree.h (expand_function_end): Remove all parameters.
+ * function.c (expand_function_end): Remove all parameters.
+ Use input_location. Never expand_end_bindings.
+ * c-decl.c (c_expand_body_1): Adjust expand_function_end call.
+ * coverage.c (create_coverage): Likewise.
+
2003-06-20 Nick Clifton <nickc@redhat.com>
* doc/extend.texi (ARM Built-in Functions): New node. Document
diff --git a/gcc/ada/ChangeLog b/gcc/ada/ChangeLog
index 2ac17b060c5..1fd2a5b3755 100644
--- a/gcc/ada/ChangeLog
+++ b/gcc/ada/ChangeLog
@@ -1,3 +1,7 @@
+2003-06-20 Nathan Sidwell <nathan@codesourcery.com>
+
+ * utils.c (end_subprog_body): Adjust expand_function_end call.
+
2003-06-16 Matt Kraai <kraai@alumni.cmu.edu>
* bindgen.adb (Gen_Main_Ada, Gen_Main_C): Do not test
diff --git a/gcc/ada/utils.c b/gcc/ada/utils.c
index 5eeca2b6828..186b0fdb175 100644
--- a/gcc/ada/utils.c
+++ b/gcc/ada/utils.c
@@ -1801,7 +1801,7 @@ end_subprog_body ()
/* Mark the RESULT_DECL as being in this subprogram. */
DECL_CONTEXT (DECL_RESULT (current_function_decl)) = current_function_decl;
- expand_function_end (input_filename, input_line, 0);
+ expand_function_end ();
/* If this is a nested function, push a new GC context. That will keep
local variables on the stack from being collected while we're doing
diff --git a/gcc/c-decl.c b/gcc/c-decl.c
index a33510cd7ac..df0984081d8 100644
--- a/gcc/c-decl.c
+++ b/gcc/c-decl.c
@@ -6375,7 +6375,7 @@ c_expand_body_1 (tree fndecl, int nested_p)
(*lang_expand_function_end) ();
/* Generate rtl for function exit. */
- expand_function_end (input_filename, input_line, 0);
+ expand_function_end ();
/* If this is a nested function, protect the local variables in the stack
above us from being collected while we're compiling this function. */
diff --git a/gcc/coverage.c b/gcc/coverage.c
index 49cf14a2689..18614b38caa 100644
--- a/gcc/coverage.c
+++ b/gcc/coverage.c
@@ -866,7 +866,7 @@ create_coverage ()
emit_library_call (gcov_init_libfunc, LCT_NORMAL, VOIDmode, 1,
gcov_info_address, Pmode);
- expand_function_end (input_filename, input_line, 0);
+ expand_function_end ();
(*lang_hooks.decls.poplevel) (1, 0, 1);
rest_of_compilation (ctor);
diff --git a/gcc/cp/ChangeLog b/gcc/cp/ChangeLog
index 32532d886cc..f92411253b6 100644
--- a/gcc/cp/ChangeLog
+++ b/gcc/cp/ChangeLog
@@ -1,3 +1,8 @@
+2003-06-20 Nathan Sidwell <nathan@codesourcery.com>
+
+ * semantics.c (genrtl_finish_function): Adjust
+ expand_function_end call.
+
2003-06-19 Mark Mitchell <mark@codesourcery.com>
PR c++/10939
diff --git a/gcc/cp/semantics.c b/gcc/cp/semantics.c
index a95c9575e6b..bb55b75af88 100644
--- a/gcc/cp/semantics.c
+++ b/gcc/cp/semantics.c
@@ -2542,7 +2542,7 @@ genrtl_finish_function (tree fn)
immediate_size_expand = 1;
/* Generate rtl for function exit. */
- expand_function_end (input_filename, input_line, 0);
+ expand_function_end ();
/* If this is a nested function (like a template instantiation that
we're compiling in the midst of compiling something else), push a
diff --git a/gcc/f/ChangeLog b/gcc/f/ChangeLog
index 629dc651b6c..916e738076a 100644
--- a/gcc/f/ChangeLog
+++ b/gcc/f/ChangeLog
@@ -1,3 +1,7 @@
+Fri Jun 20 10:00:31 2003 Nathan Sidwell <nathan@codesourcery.com>
+
+ * com.c (finish_function): Adjust expand_function_end call.
+
2003-06-17 Nathanael Nerode <neroden@gcc.gnu.org>
* Make-lang.in: Replace BUILD_CC references with CC_FOR_BUILD.
diff --git a/gcc/f/com.c b/gcc/f/com.c
index aec7ce33722..f384439955b 100644
--- a/gcc/f/com.c
+++ b/gcc/f/com.c
@@ -13604,7 +13604,7 @@ finish_function (int nested)
/* Obey `register' declarations if `setjmp' is called in this fn. */
/* Generate rtl for function exit. */
- expand_function_end (input_filename, input_line, 0);
+ expand_function_end ();
/* If this is a nested function, protect the local variables in the stack
above us from being collected while we're compiling this function. */
diff --git a/gcc/function.c b/gcc/function.c
index 3f795549df8..175262c5dd8 100644
--- a/gcc/function.c
+++ b/gcc/function.c
@@ -6963,17 +6963,10 @@ use_return_register ()
static GTY(()) rtx initial_trampoline;
-/* Generate RTL for the end of the current function.
- FILENAME and LINE are the current position in the source file.
-
- It is up to language-specific callers to do cleanups for parameters--
- or else, supply 1 for END_BINDINGS and we will call expand_end_bindings. */
+/* Generate RTL for the end of the current function. */
void
-expand_function_end (filename, line, end_bindings)
- const char *filename;
- int line;
- int end_bindings;
+expand_function_end ()
{
tree link;
rtx clobber_after;
@@ -7099,7 +7092,7 @@ expand_function_end (filename, line, end_bindings)
/* Output a linenumber for the end of the function.
SDB depends on this. */
- emit_line_note_force (filename, line);
+ emit_line_note_force (input_filename, input_line);
/* Before the return label (if any), clobber the return
registers so that they are not propagated live to the rest of
@@ -7119,10 +7112,6 @@ expand_function_end (filename, line, end_bindings)
if (return_label)
emit_label (return_label);
- /* C++ uses this. */
- if (end_bindings)
- expand_end_bindings (0, 0, 0);
-
if (current_function_instrument_entry_exit)
{
rtx fun = DECL_RTL (current_function_decl);
diff --git a/gcc/java/ChangeLog b/gcc/java/ChangeLog
index b370870e7c9..8c3aaad0e5f 100644
--- a/gcc/java/ChangeLog
+++ b/gcc/java/ChangeLog
@@ -1,3 +1,12 @@
+2003-06-20 Nathan Sidwell <nathan@codesourcery.com>
+
+ * class.c (push_class): Use a location_t to save place.
+ (emit_register_classes): Set input_location. Adjust
+ expand_function_end call.
+ * resource.c (write_resource_constructor): Likewise.
+ * decl.c (end_java_method): Adjust expand_function_end call.
+ * parse.y (source_end_java_method): Likewise.
+
2003-06-17 Robert Abeles <rabeles@archaelogic.com>
* lang.c (java_handle_option): Likewise.
diff --git a/gcc/java/class.c b/gcc/java/class.c
index fe00f78f9a3..ed1ae4d7116 100644
--- a/gcc/java/class.c
+++ b/gcc/java/class.c
@@ -308,8 +308,7 @@ tree
push_class (tree class_type, tree class_name)
{
tree decl, signature;
- const char *save_input_filename = input_filename;
- int save_lineno = input_line;
+ location_t saved_loc = input_location;
tree source_name = identifier_subst (class_name, "", '.', '/', ".java");
CLASS_P (class_type) = 1;
input_filename = IDENTIFIER_POINTER (source_name);
@@ -319,8 +318,7 @@ push_class (tree class_type, tree class_name)
/* dbxout needs a DECL_SIZE if in gstabs mode */
DECL_SIZE (decl) = integer_zero_node;
- input_filename = save_input_filename;
- input_line = save_lineno;
+ input_location = saved_loc;
signature = identifier_subst (class_name, "L", '.', '/', ";");
IDENTIFIER_SIGNATURE_TYPE (signature) = build_pointer_type (class_type);
@@ -2000,6 +1998,7 @@ emit_register_classes (void)
tree init_type = build_function_type (void_type_node, end_params_node);
tree init_decl;
tree t;
+ location_t saved_loc = input_location;
init_decl = build_decl (FUNCTION_DECL, init_name, init_type);
SET_DECL_ASSEMBLER_NAME (init_decl, init_name);
@@ -2028,8 +2027,8 @@ emit_register_classes (void)
for ( t = registered_class; t; t = TREE_CHAIN (t))
emit_library_call (registerClass_libfunc, 0, VOIDmode, 1,
XEXP (DECL_RTL (t), 0), Pmode);
-
- expand_function_end (input_filename, 0, 0);
+ input_location = DECL_SOURCE_LOCATION (init_decl);
+ expand_function_end ();
poplevel (1, 0, 1);
rest_of_compilation (init_decl);
current_function_decl = NULL_TREE;
@@ -2037,6 +2036,7 @@ emit_register_classes (void)
if (targetm.have_ctors_dtors)
(* targetm.asm_out.constructor) (XEXP (DECL_RTL (init_decl), 0),
DEFAULT_INIT_PRIORITY);
+ input_location = saved_loc;
}
}
diff --git a/gcc/java/decl.c b/gcc/java/decl.c
index 7d5507cd8ed..5354f8963dd 100644
--- a/gcc/java/decl.c
+++ b/gcc/java/decl.c
@@ -1810,7 +1810,7 @@ end_java_method (void)
BLOCK_SUPERCONTEXT (DECL_INITIAL (fndecl)) = fndecl;
/* Generate rtl for function exit. */
- expand_function_end (input_filename, input_line, 0);
+ expand_function_end ();
/* Run the optimizers and output assembler code for this function. */
rest_of_compilation (fndecl);
diff --git a/gcc/java/parse.y b/gcc/java/parse.y
index 854fd5f07bf..a156be1ccfd 100644
--- a/gcc/java/parse.y
+++ b/gcc/java/parse.y
@@ -7386,7 +7386,7 @@ source_end_java_method (void)
if (! flag_emit_class_files && ! flag_emit_xref)
{
input_line = DECL_FUNCTION_LAST_LINE (fndecl);
- expand_function_end (input_filename, input_line, 0);
+ expand_function_end ();
/* Run the optimizers and output assembler code for this function. */
rest_of_compilation (fndecl);
diff --git a/gcc/java/resource.c b/gcc/java/resource.c
index a1de225c608..b71a6709f5e 100644
--- a/gcc/java/resource.c
+++ b/gcc/java/resource.c
@@ -104,6 +104,7 @@ write_resource_constructor (void)
{
tree init_name, init_type, init_decl;
tree iter;
+ location_t saved_loc = input_location;
/* Only do work if required. */
if (resources == NULL_TREE)
@@ -139,7 +140,8 @@ write_resource_constructor (void)
Pmode);
}
- expand_function_end (input_filename, 0, 0);
+ input_location = DECL_SOURCE_LOCATION (init_decl);
+ expand_function_end ();
poplevel (1, 0, 1);
{
/* Force generation, even with -O3 or deeper. Gross hack.
@@ -152,6 +154,7 @@ write_resource_constructor (void)
current_function_decl = NULL_TREE;
(* targetm.asm_out.constructor) (XEXP (DECL_RTL (init_decl), 0),
DEFAULT_INIT_PRIORITY);
+ input_location = saved_loc;
}
/* Generate a byte array representing the contents of FILENAME. The
diff --git a/gcc/tree.h b/gcc/tree.h
index 0466a03d67b..26c79a8489b 100644
--- a/gcc/tree.h
+++ b/gcc/tree.h
@@ -2806,7 +2806,7 @@ extern void type_hash_add PARAMS ((unsigned int, tree));
extern unsigned int type_hash_list PARAMS ((tree));
extern int simple_cst_list_equal PARAMS ((tree, tree));
extern void dump_tree_statistics PARAMS ((void));
-extern void expand_function_end PARAMS ((const char *, int, int));
+extern void expand_function_end PARAMS ((void));
extern void expand_function_start PARAMS ((tree, int));
extern void expand_pending_sizes PARAMS ((tree));
diff --git a/gcc/treelang/ChangeLog b/gcc/treelang/ChangeLog
index a9003784e01..cd821889855 100644
--- a/gcc/treelang/ChangeLog
+++ b/gcc/treelang/ChangeLog
@@ -1,3 +1,8 @@
+2003-06-20 Nathan Sidwell <nathan@codesourcery.com>
+
+ * treetree.c (tree_code_create_function_wrapup): Adjust
+ expand_function_end call.
+
2003-06-18 Nathan Sidwell <nathan@codesourcery.com>
* treetree.c (build_stmt): Remove VPARAMS.
diff --git a/gcc/treelang/treetree.c b/gcc/treelang/treetree.c
index 11f59d0efce..57a4a48fbfd 100644
--- a/gcc/treelang/treetree.c
+++ b/gcc/treelang/treetree.c
@@ -452,7 +452,7 @@ tree_code_create_function_wrapup (location_t loc)
/* Emit rtl for end of function. */
- expand_function_end (loc.file, loc.line, 0);
+ expand_function_end ();
/* Pop the level. */