OSDN Git Service

* config/vax/vax.c (split_quadword_operands): Use MEM_P()
[pf3gnuchains/gcc-fork.git] / gcc / c-pch.c
index 9ec5b7b..37c8c30 100644 (file)
@@ -187,7 +187,7 @@ c_common_write_pch (void)
   if (fwrite (&h, sizeof (h), 1, pch_outfile) != 1)
     fatal_error ("can%'t write %s: %m", pch_file);
   
-  buf = xmalloc (16384);
+  buf = XNEWVEC (char, 16384);
 
   if (fseek (asm_out_file, asm_file_startpos, SEEK_SET) != 0)
     fatal_error ("can%'t seek in %s: %m", asm_file_name);
@@ -385,7 +385,7 @@ c_common_read_pch (cpp_reader *pfile, const char *name,
   if (!flag_preprocess_only)
     {
       unsigned long written;
-      char * buf = xmalloc (16384);
+      char * buf = XNEWVEC (char, 16384);
 
       for (written = 0; written < h.asm_size; )
        {
@@ -441,18 +441,10 @@ c_common_no_more_pch (void)
 #endif
 
 void
-c_common_pch_pragma (cpp_reader *pfile)
+c_common_pch_pragma (cpp_reader *pfile, const char *name)
 {
-  tree name_t;
-  const char *name;
   int fd;
 
-  if (c_lex (&name_t) != CPP_STRING)
-    {
-      error ("malformed #pragma GCC pch_preprocess, ignored");
-      return;
-    }
-
   if (!cpp_get_options (pfile)->preprocessed)
     {
       error ("pch_preprocess pragma should only be used with -fpreprocessed");
@@ -460,11 +452,9 @@ c_common_pch_pragma (cpp_reader *pfile)
       return;
     }
 
-  name = TREE_STRING_POINTER (name_t);
-  
   fd = open (name, O_RDONLY | O_BINARY, 0666);
   if (fd == -1)
-    fatal_error ("%s: couldn%'t open PCH file: %m\n", name);
+    fatal_error ("%s: couldn%'t open PCH file: %m", name);
   
   if (c_common_valid_pch (pfile, name, fd) != 1)
     {