diff options
author | Nathan Sidwell <nathan@codesourcery.com> | 2003-06-29 11:28:00 +0000 |
---|---|---|
committer | Nathan Sidwell <nathan@gcc.gnu.org> | 2003-06-29 11:28:00 +0000 |
commit | 4714db5aef1205624a11f594c7bd45e87a4a0092 (patch) | |
tree | acede1ca18b6f98fec18a1205ed048166fb0fe9e /gcc | |
parent | 165f54e074b91a80005c7e776f1cceae089b9655 (diff) | |
download | gcc-4714db5aef1205624a11f594c7bd45e87a4a0092.zip gcc-4714db5aef1205624a11f594c7bd45e87a4a0092.tar.gz gcc-4714db5aef1205624a11f594c7bd45e87a4a0092.tar.bz2 |
c-decl.c (c_init_decl_processing): Use a location_t.
* c-decl.c (c_init_decl_processing): Use a location_t. Set input
filename to <internal>.
* tree.c (make_node): Just copy the current location.
From-SVN: r68667
Diffstat (limited to 'gcc')
-rw-r--r-- | gcc/ChangeLog | 6 | ||||
-rw-r--r-- | gcc/c-decl.c | 10 | ||||
-rw-r--r-- | gcc/tree.c | 4 |
3 files changed, 12 insertions, 8 deletions
diff --git a/gcc/ChangeLog b/gcc/ChangeLog index 4692b8f..84048c2 100644 --- a/gcc/ChangeLog +++ b/gcc/ChangeLog @@ -1,3 +1,9 @@ +2003-06-29 Nathan Sidwell <nathan@codesourcery.com> + + * c-decl.c (c_init_decl_processing): Use a location_t. Set input + filename to <internal>. + * tree.c (make_node): Just copy the current location. + 2003-06-29 Eric Botcazou <ebotcazou@libertysurf.fr> PR optimization/11210 diff --git a/gcc/c-decl.c b/gcc/c-decl.c index 0caed47..78b74a4 100644 --- a/gcc/c-decl.c +++ b/gcc/c-decl.c @@ -2232,8 +2232,8 @@ c_init_decl_processing (void) { tree endlink; tree ptr_ftype_void, ptr_ftype_ptr; - const char *save_input_filename; - + location_t save_loc = input_location; + /* Adds some ggc roots, and reserved words for c-parse.in. */ c_parse_init (); @@ -2248,8 +2248,8 @@ c_init_decl_processing (void) /* Declarations from c_common_nodes_and_builtins must not be associated with this input file, lest we get differences between using and not using preprocessed headers. */ - save_input_filename = input_filename; - input_filename = NULL; + input_location.file = "<internal>"; + input_location.line = 0; build_common_tree_nodes (flag_signed_char); @@ -2277,7 +2277,7 @@ c_init_decl_processing (void) = build_function_type (ptr_type_node, tree_cons (NULL_TREE, ptr_type_node, endlink)); - input_filename = save_input_filename; + input_location = save_loc; pedantic_lvalues = pedantic; @@ -308,9 +308,7 @@ make_node (code) DECL_ALIGN (t) = 1; DECL_USER_ALIGN (t) = 0; DECL_IN_SYSTEM_HEADER (t) = in_system_header; - DECL_SOURCE_LINE (t) = input_line; - DECL_SOURCE_FILE (t) = - (input_filename) ? input_filename : "<built-in>"; + DECL_SOURCE_LOCATION (t) = input_location; DECL_UID (t) = next_decl_uid++; /* We have not yet computed the alias set for this declaration. */ |