OSDN Git Service

* c-decl.c (c_init_decl_processing): Clear input_file_name
[pf3gnuchains/gcc-fork.git] / gcc / ggc-common.c
index db8cbd0..adf2fd0 100644 (file)
@@ -411,7 +411,7 @@ write_pch_globals (tab, state)
            {
              if (fwrite (&ptr, sizeof (void *), 1, state->f) 
                  != 1)
-               fatal_io_error ("can't write PCH file");
+               fatal_error ("can't write PCH file: %m");
            }
          else
            {
@@ -419,7 +419,7 @@ write_pch_globals (tab, state)
                                             POINTER_HASH (ptr));
              if (fwrite (&new_ptr->new_addr, sizeof (void *), 1, state->f) 
                  != 1)
-               fatal_io_error ("can't write PCH file");
+               fatal_error ("can't write PCH file: %m");
            }
        }
 }
@@ -496,7 +496,7 @@ gt_pch_save (f)
   for (rt = gt_pch_scalar_rtab; *rt; rt++)
     for (rti = *rt; rti->base != NULL; rti++)
       if (fwrite (rti->base, rti->stride, 1, f) != 1)
-       fatal_io_error ("can't write PCH file");
+       fatal_error ("can't write PCH file: %m");
 
   /* Write out all the global pointers, after translation.  */
   write_pch_globals (gt_ggc_rtab, &state);
@@ -509,17 +509,17 @@ gt_pch_save (f)
     long o;
     o = ftell (state.f) + sizeof (mmi);
     if (o == -1)
-      fatal_io_error ("can't get position in PCH file");
+      fatal_error ("can't get position in PCH file: %m");
     mmi.offset = page_size - o % page_size;
     if (mmi.offset == page_size)
       mmi.offset = 0;
     mmi.offset += o;
   }
   if (fwrite (&mmi, sizeof (mmi), 1, state.f) != 1)
-    fatal_io_error ("can't write PCH file");
+    fatal_error ("can't write PCH file: %m");
   if (mmi.offset != 0
       && fseek (state.f, mmi.offset, SEEK_SET) != 0)
-    fatal_io_error ("can't write padding to PCH file");
+    fatal_error ("can't write padding to PCH file: %m");
 
   /* Actually write out the objects.  */
   for (i = 0; i < state.count; i++)
@@ -572,7 +572,7 @@ gt_pch_restore (f)
   for (rt = gt_pch_scalar_rtab; *rt; rt++)
     for (rti = *rt; rti->base != NULL; rti++)
       if (fread (rti->base, rti->stride, 1, f) != 1)
-       fatal_io_error ("can't read PCH file");
+       fatal_error ("can't read PCH file: %m");
 
   /* Read in all the global pointers, in 6 easy loops.  */
   for (rt = gt_ggc_rtab; *rt; rt++)
@@ -580,17 +580,17 @@ gt_pch_restore (f)
       for (i = 0; i < rti->nelt; i++)
        if (fread ((char *)rti->base + rti->stride * i,
                   sizeof (void *), 1, f) != 1)
-         fatal_io_error ("can't read PCH file");
+         fatal_error ("can't read PCH file: %m");
 
   for (rt = gt_pch_cache_rtab; *rt; rt++)
     for (rti = *rt; rti->base != NULL; rti++)
       for (i = 0; i < rti->nelt; i++)
        if (fread ((char *)rti->base + rti->stride * i,
                   sizeof (void *), 1, f) != 1)
-         fatal_io_error ("can't read PCH file");
+         fatal_error ("can't read PCH file: %m");
 
   if (fread (&mmi, sizeof (mmi), 1, f) != 1)
-    fatal_io_error ("can't read PCH file");
+    fatal_error ("can't read PCH file: %m");
   
 #if HAVE_MMAP_FILE
   addr = mmap (mmi.preferred_base, mmi.size, 
@@ -604,10 +604,10 @@ gt_pch_restore (f)
       addr = xmalloc (mmi.size);
       if (fseek (f, mmi.offset, SEEK_SET) != 0
          || fread (&mmi, mmi.size, 1, f) != 1)
-       fatal_io_error ("can't read PCH file");
+       fatal_error ("can't read PCH file: %m");
     }
   else if (fseek (f, mmi.offset + mmi.size, SEEK_SET) != 0)
-    fatal_io_error ("can't read PCH file");
+    fatal_error ("can't read PCH file: %m");
 
   ggc_pch_read (f, addr);