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);
if (!flag_preprocess_only)
{
unsigned long written;
- char * buf = xmalloc (16384);
+ char * buf = XNEWVEC (char, 16384);
for (written = 0; written < h.asm_size; )
{
#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");
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)
{