summaryrefslogtreecommitdiff
path: root/gcc
diff options
context:
space:
mode:
authorbothner <bothner@138bc75d-0d04-0410-961f-82ee72b054a4>2003-06-05 21:07:08 +0000
committerbothner <bothner@138bc75d-0d04-0410-961f-82ee72b054a4>2003-06-05 21:07:08 +0000
commit62a17411f9c605aa2af1746290bc2669587c39fd (patch)
tree96b2b61a1066d26d90ea69bc31ba220d8e378128 /gcc
parent0159e5530d293fac2cfa1f90b5dfca29c491dd83 (diff)
downloadgcc-62a17411f9c605aa2af1746290bc2669587c39fd.tar.gz
* toplev.c (push_srcloc): Simplify behavior to save current location
and set current location to parameters. (pop_srcloc): Simplify semantics. (lang_dependent_init): Remove now-useless initial push_srcloc. git-svn-id: svn+ssh://gcc.gnu.org/svn/gcc/trunk@67512 138bc75d-0d04-0410-961f-82ee72b054a4
Diffstat (limited to 'gcc')
-rw-r--r--gcc/ChangeLog7
-rw-r--r--gcc/toplev.c19
2 files changed, 10 insertions, 16 deletions
diff --git a/gcc/ChangeLog b/gcc/ChangeLog
index a332e9cb5f3..a47ffc7e326 100644
--- a/gcc/ChangeLog
+++ b/gcc/ChangeLog
@@ -1,3 +1,10 @@
+2003-06-05 Per Bothner <pbothner@apple.com>
+
+ * toplev.c (push_srcloc): Simplify behavior to save current location
+ and set current location to parameters.
+ (pop_srcloc): Simplify semantics.
+ (lang_dependent_init): Remove now-useless initial push_srcloc.
+
2003-05-06 Richard Henderson <rth@redhat.com>
* dwarf2out.c (loc_descriptor_from_tree): Return 0 for
diff --git a/gcc/toplev.c b/gcc/toplev.c
index 5f6ea8c1aea..f005f0418ff 100644
--- a/gcc/toplev.c
+++ b/gcc/toplev.c
@@ -2170,14 +2170,11 @@ push_srcloc (const char *file, int line)
{
struct file_stack *fs;
- if (input_file_stack)
- input_file_stack->location = input_location;
-
fs = (struct file_stack *) xmalloc (sizeof (struct file_stack));
- input_filename = file;
- input_line = line;
fs->location = input_location;
fs->next = input_file_stack;
+ input_filename = file;
+ input_line = line;
input_file_stack = fs;
input_file_stack_tick++;
}
@@ -2192,17 +2189,10 @@ pop_srcloc (void)
struct file_stack *fs;
fs = input_file_stack;
+ input_location = fs->location;
input_file_stack = fs->next;
free (fs);
input_file_stack_tick++;
-
- if (input_file_stack)
- input_location = input_file_stack->location;
- else
- {
- input_filename = NULL;
- input_line = 0;
- }
}
/* Compile an entire translation unit. Write a file of assembly
@@ -5651,9 +5641,6 @@ lang_dependent_init (const char *name)
init_expr_once ();
expand_dummy_function_end ();
- /* Put an entry on the input file stack for the main input file. */
- push_srcloc (input_filename, 0);
-
/* If dbx symbol table desired, initialize writing it and output the
predefined types. */
timevar_push (TV_SYMOUT);