From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (qmail 30714 invoked by alias); 30 Jan 2008 00:44:39 -0000 Received: (qmail 30591 invoked by uid 48); 30 Jan 2008 00:43:57 -0000 Date: Wed, 30 Jan 2008 01:20:00 -0000 Message-ID: <20080130004357.30590.qmail@sourceware.org> X-Bugzilla-Reason: CC References: Subject: [Bug pch/35027] "too short to be a PCH file" warning should be conditional on -Winvalid-PCH In-Reply-To: Reply-To: gcc-bugzilla@gcc.gnu.org To: gcc-bugs@gcc.gnu.org From: "pinskia at gcc dot gnu dot org" Mailing-List: contact gcc-bugs-help@gcc.gnu.org; run by ezmlm Precedence: bulk List-Id: List-Archive: List-Post: List-Help: Sender: gcc-bugs-owner@gcc.gnu.org X-SW-Source: 2008-01/txt/msg03628.txt.bz2 ------- 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