summaryrefslogtreecommitdiff
path: root/gcc/c-pch.c
diff options
context:
space:
mode:
authorAndrew Pinski <andrew_pinski@playstation.sony.com>2008-02-23 17:08:12 +0000
committerAndrew Pinski <pinskia@gcc.gnu.org>2008-02-23 09:08:12 -0800
commitbb1f73c2d57ad7e535fe8dbcc52e2d3a3bc680de (patch)
tree285fd6c0be11d5ba49f73653861ce790675641a8 /gcc/c-pch.c
parent8ddcfde143971709cc4c45d0c9de1e3b511b77aa (diff)
downloadgcc-bb1f73c2d57ad7e535fe8dbcc52e2d3a3bc680de.tar.gz
re PR pch/35027 ("too short to be a PCH file" warning should be conditional on -Winvalid-PCH)
2008-02-23 Andrew Pinski <andrew_pinski@playstation.sony.com> PR pch/35027 * c-pch.c (c_common_valid_pch): Make the "too short to be a PCH file" warning condtional on -Winvalid-PCH. From-SVN: r132574
Diffstat (limited to 'gcc/c-pch.c')
-rw-r--r--gcc/c-pch.c5
1 files changed, 3 insertions, 2 deletions
diff --git a/gcc/c-pch.c b/gcc/c-pch.c
index d8751e83070..ccf3c86590c 100644
--- a/gcc/c-pch.c
+++ b/gcc/c-pch.c
@@ -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;
}