OSDN Git Service

* c-decl.c (c_init_decl_processing): Clear input_file_name
authoramylaar <amylaar@138bc75d-0d04-0410-961f-82ee72b054a4>
Wed, 4 Jun 2003 17:19:36 +0000 (17:19 +0000)
committeramylaar <amylaar@138bc75d-0d04-0410-961f-82ee72b054a4>
Wed, 4 Jun 2003 17:19:36 +0000 (17:19 +0000)
while building common nodes.
* dwarf2out.c (gen_compile_unit_die, dwarf2out_finish):
Don't add working directory for strings like <built-in> .

git-svn-id: svn+ssh://gcc.gnu.org/svn/gcc/trunk@67452 138bc75d-0d04-0410-961f-82ee72b054a4

gcc/ChangeLog
gcc/c-decl.c
gcc/dwarf2out.c

index e46b329..7c7b426 100644 (file)
@@ -1,3 +1,10 @@
+2003-06-04  J"orn Rennecke <joern.rennecke@superh.com>
+
+       * c-decl.c (c_init_decl_processing): Clear input_file_name
+       while building common nodes.
+       * dwarf2out.c (gen_compile_unit_die, dwarf2out_finish):
+       Don't add working directory for strings like <built-in> .
+
 2003-06-04  David Edelsohn  <edelsohn@gnu.org>
 
        * doc/install.texi (*-ibm-aix*): Native as and ld required
index f9124e4..b81ecd8 100644 (file)
@@ -2268,6 +2268,7 @@ c_init_decl_processing ()
 {
   tree endlink;
   tree ptr_ftype_void, ptr_ftype_ptr;
+  const char *save_input_filename;
 
   /* Adds some ggc roots, and reserved words for c-parse.in.  */
   c_parse_init ();
@@ -2280,6 +2281,11 @@ c_init_decl_processing ()
   /* Make the binding_level structure for global names.  */
   pushlevel (0);
   global_binding_level = current_binding_level;
+  /* 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;
 
   build_common_tree_nodes (flag_signed_char);
 
@@ -2307,6 +2313,8 @@ c_init_decl_processing ()
     = build_function_type (ptr_type_node,
                           tree_cons (NULL_TREE, ptr_type_node, endlink));
 
+  input_filename = save_input_filename;
+
   pedantic_lvalues = pedantic;
 
   make_fname_decl = c_make_fname_decl;
index 3d908e4..e649329 100644 (file)
@@ -11493,7 +11493,8 @@ gen_compile_unit_die (filename)
   if (filename)
     {
       add_name_attribute (die, filename);
-      if (filename[0] != DIR_SEPARATOR)
+      /* Don't add cwd for <built-in>.  */
+      if (filename[0] != DIR_SEPARATOR && filename[0] != '<')
        add_comp_dir_attribute (die);
     }
 
@@ -13084,7 +13085,9 @@ dwarf2out_finish (filename)
     {
       size_t i;
       for (i = 1; i < VARRAY_ACTIVE_SIZE (file_table); i++)
-       if (VARRAY_CHAR_PTR (file_table, i)[0] != DIR_SEPARATOR)
+       if (VARRAY_CHAR_PTR (file_table, i)[0] != DIR_SEPARATOR
+           /* Don't add cwd for <built-in>.  */
+           && VARRAY_CHAR_PTR (file_table, i)[0] != '<')
          {
            add_comp_dir_attribute (comp_unit_die);
            break;