From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (qmail 1985 invoked by alias); 31 Jan 2014 21:27:33 -0000 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 Received: (qmail 1974 invoked by uid 48); 31 Jan 2014 21:27:30 -0000 From: "megahallon at gmail dot com" To: gcc-bugs@gcc.gnu.org Subject: [Bug c/60014] New: Bad warning suppression Date: Fri, 31 Jan 2014 21:27:00 -0000 X-Bugzilla-Reason: CC X-Bugzilla-Type: new X-Bugzilla-Watch-Reason: None X-Bugzilla-Product: gcc X-Bugzilla-Component: c X-Bugzilla-Version: 4.8.2 X-Bugzilla-Keywords: X-Bugzilla-Severity: normal X-Bugzilla-Who: megahallon at gmail dot com X-Bugzilla-Status: UNCONFIRMED X-Bugzilla-Priority: P3 X-Bugzilla-Assigned-To: unassigned at gcc dot gnu.org X-Bugzilla-Target-Milestone: --- X-Bugzilla-Flags: X-Bugzilla-Changed-Fields: bug_id short_desc product version bug_status bug_severity priority component assigned_to reporter Message-ID: Content-Type: text/plain; charset="UTF-8" Content-Transfer-Encoding: 7bit X-Bugzilla-URL: http://gcc.gnu.org/bugzilla/ Auto-Submitted: auto-generated MIME-Version: 1.0 X-SW-Source: 2014-01/txt/msg03380.txt.bz2 http://gcc.gnu.org/bugzilla/show_bug.cgi?id=60014 Bug ID: 60014 Summary: Bad warning suppression Product: gcc Version: 4.8.2 Status: UNCONFIRMED Severity: normal Priority: P3 Component: c Assignee: unassigned at gcc dot gnu.org Reporter: megahallon at gmail dot com Using gcc 4.8.2: /tmp/foo/foo.h: ------------------------------- #define FOO(a, b) __LINE__; ------------------------------- bug.c: ------------------------------- #include "foo.h" int main() { FOO(1, 0); char* a = 1; } ------------------------------- $ /usr/bin/gcc bug.c -isystem /tmp/foo -no-integrated-cpp should give a warning on line 7 but it not seen. These works: $ /usr/bin/gcc bug.c -isystem /tmp/foo -no-integrated-cpp -ftrack-macro-expansion=0 $ /usr/bin/gcc bug.c -I /tmp/foo -no-integrated-cpp $ /usr/bin/gcc bug.c -isystem /tmp/foo -save-temps gives the same results as -no-integrated-cpp. Output from -save-temps: bug.i ----------------------------- void main() { 6 # 5 "bug.c" 3 4 ; ; char *a = 1; } ----------------------------- The suppress flag in the line directive apparently affects line 7 which is not as expected. In practice this means that ccache and similar systems that compiles preprocessed output may fail to show warnings that are seen when compiling normally.