From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (qmail 16979 invoked by alias); 24 Mar 2014 15:56:58 -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 16492 invoked by uid 48); 24 Mar 2014 15:56:53 -0000 From: "lavr at ncbi dot nlm.nih.gov" To: gcc-bugs@gcc.gnu.org Subject: [Bug c/60100] warning disappears when preprocessed source is compiled Date: Mon, 24 Mar 2014 15:56:00 -0000 X-Bugzilla-Reason: CC X-Bugzilla-Type: changed X-Bugzilla-Watch-Reason: None X-Bugzilla-Product: gcc X-Bugzilla-Component: c X-Bugzilla-Version: 4.8.1 X-Bugzilla-Keywords: X-Bugzilla-Severity: normal X-Bugzilla-Who: lavr at ncbi dot nlm.nih.gov X-Bugzilla-Status: WAITING 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: Message-ID: In-Reply-To: References: 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-03/txt/msg02157.txt.bz2 http://gcc.gnu.org/bugzilla/show_bug.cgi?id=60100 --- Comment #8 from lavr at ncbi dot nlm.nih.gov --- This is the code from the original .c file that fails to post a warning. sock->w_len -= BUF_PeekAtCB(sock->w_buf, BUF_Size(sock->w_buf) - sock->w_len, x_WriteBuf, &ctx, sock->w_len); It is not changed in any way during pre-processing. An assert() comes right after it. x_WriteBuf is a function (defined just prior to the function where it is used) that had a wrong prototype versus what a header defining BUF_PeekAtCB() declared. What constitutes a system header? Because a file that defines BUF_PeekAtCB() is referenced via angle brackets (versus quotes) in the #include directive. A path for gcc is provided with the -I option. Finally, if gcc compiling the original code .c manages to post a warning, it certainly somehow knows that no system headers are involved in this particular case.