This is the mail archive of the
gcc-bugs@gcc.gnu.org
mailing list for the GCC project.
[Bug pch/35027] "too short to be a PCH file" warning should be conditional on -Winvalid-PCH
- From: "pinskia at gcc dot gnu dot org" <gcc-bugzilla at gcc dot gnu dot org>
- To: gcc-bugs at gcc dot gnu dot org
- Date: 30 Jan 2008 00:43:57 -0000
- Subject: [Bug pch/35027] "too short to be a PCH file" warning should be conditional on -Winvalid-PCH
- References: <bug-35027-6528@http.gcc.gnu.org/bugzilla/>
- Reply-to: gcc-bugzilla at gcc dot gnu dot org
------- Comment #1 from pinskia at gcc dot gnu dot org 2008-01-30 00:43 -------
I have a simple fix for 4.4.0:
Index: c-pch.c
===================================================================
--- c-pch.c (revision 131943)
+++ c-pch.c (working copy)
@@ -243,8 +243,9 @@
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;
}
--
pinskia at gcc dot gnu dot org changed:
What |Removed |Added
----------------------------------------------------------------------------
OtherBugsDependingO| |33702
nThis| |
AssignedTo|unassigned at gcc dot gnu |pinskia at gcc dot gnu dot
|dot org |org
Status|UNCONFIRMED |ASSIGNED
Ever Confirmed|0 |1
Last reconfirmed|0000-00-00 00:00:00 |2008-01-30 00:43:57
date| |
Target Milestone|--- |4.4.0
http://gcc.gnu.org/bugzilla/show_bug.cgi?id=35027