OSDN Git Service

2008-02-23 Andrew Pinski <andrew_pinski@playstation.sony.com>
[pf3gnuchains/gcc-fork.git] / gcc / c-pch.c
index d8751e8..ccf3c86 100644 (file)
@@ -243,8 +243,9 @@ c_common_valid_pch (cpp_reader *pfile, const char *name, int fd)
     fatal_error ("can%'t read %s: %m", name);
   else if (sizeread != IDENT_LENGTH + 16)
     {
-      cpp_error (pfile, CPP_DL_WARNING, "%s: too short to be a PCH file",
-                name);
+      if (cpp_get_options (pfile)->warn_invalid_pch)
+       cpp_error (pfile, CPP_DL_WARNING, "%s: too short to be a PCH file",
+                  name);
       return 2;
     }