From c12ee0c6f87eba261d98bca334f8ea8026d0dd7c Mon Sep 17 00:00:00 2001 From: pinskia Date: Sat, 23 Feb 2008 17:08:12 +0000 Subject: 2008-02-23 Andrew Pinski PR pch/35027 * c-pch.c (c_common_valid_pch): Make the "too short to be a PCH file" warning condtional on -Winvalid-PCH. git-svn-id: svn+ssh://gcc.gnu.org/svn/gcc/trunk@132574 138bc75d-0d04-0410-961f-82ee72b054a4 --- gcc/c-pch.c | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) (limited to 'gcc/c-pch.c') 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; } -- cgit v1.2.1