OSDN Git Service

Merged from trunk
authorktietz <ktietz@138bc75d-0d04-0410-961f-82ee72b054a4>
Wed, 27 Jun 2012 15:06:16 +0000 (15:06 +0000)
committerktietz <ktietz@138bc75d-0d04-0410-961f-82ee72b054a4>
Wed, 27 Jun 2012 15:06:16 +0000 (15:06 +0000)
        PR preprocessor/37215
        * c-ppoutput.c (preprocess_file): Check for nonempty buffer.

git-svn-id: svn+ssh://gcc.gnu.org/svn/gcc/branches/gcc-4_7-branch@189019 138bc75d-0d04-0410-961f-82ee72b054a4

gcc/c-family/ChangeLog
gcc/c-family/c-ppoutput.c

index 771f6e3..97192ac 100644 (file)
@@ -1,3 +1,9 @@
+2012-06-27  Kai Tietz  <ktietz@redhat.com>
+
+       Merged from trunk
+       PR preprocessor/37215
+       * c-ppoutput.c (preprocess_file): Check for nonempty buffer.
+
 2012-06-14  Release Manager
 
        * GCC 4.7.1 released.
index df46ce4..862d15d 100644 (file)
@@ -86,7 +86,7 @@ preprocess_file (cpp_reader *pfile)
 {
   /* A successful cpp_read_main_file guarantees that we can call
      cpp_scan_nooutput or cpp_get_token next.  */
-  if (flag_no_output)
+  if (flag_no_output && pfile->buffer)
     {
       /* Scan -included buffers, then the main file.  */
       while (pfile->buffer->prev)