OSDN Git Service

Correct datestamp of my most recent entry.
[pf3gnuchains/gcc-fork.git] / gcc / c-ppoutput.c
index 5fb41b2..ff3e6b6 100644 (file)
@@ -1,6 +1,6 @@
 /* Preprocess only, using cpplib.
    Copyright (C) 1995, 1997, 1998, 1999, 2000, 2001, 2002, 2003, 2004, 2007,
-   2008 Free Software Foundation, Inc.
+   2008, 2009 Free Software Foundation, Inc.
    Written by Per Bothner, 1994-95.
 
    This program is free software; you can redistribute it and/or modify it
@@ -146,10 +146,8 @@ init_pp_output (FILE *out_stream)
       cb->used_undef = cb_used_undef;
     }
 
-  /* Initialize the print structure.  Setting print.src_line to -1 here is
-     a trick to guarantee that the first token of the file will cause
-     a linemarker to be output by maybe_print_line.  */
-  print.src_line = -1;
+  /* Initialize the print structure.  */
+  print.src_line = 1;
   print.printed = 0;
   print.prev = 0;
   print.outf = out_stream;
@@ -408,6 +406,8 @@ cb_used_define (cpp_reader *pfile, source_location line ATTRIBUTE_UNUSED,
                cpp_hashnode *node)
 {
   macro_queue *q;
+  if (node->flags & NODE_BUILTIN)
+    return;
   q = XNEW (macro_queue);
   q->macro = xstrdup ((const char *) cpp_macro_definition (pfile, node));
   q->next = define_queue;
@@ -521,6 +521,7 @@ pp_file_change (const struct line_map *map)
 
   if (map != NULL)
     {
+      input_location = map->start_location;
       if (print.first_time)
        {
          /* Avoid printing foo.i when the main file is foo.c.  */