From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (qmail 2086 invoked by alias); 29 Oct 2012 14:43:00 -0000 Received: (qmail 32106 invoked by uid 48); 29 Oct 2012 14:42:10 -0000 From: "pierre.poissinger at gmail dot com" To: gcc-bugs@gcc.gnu.org Subject: [Bug preprocessor/55115] [>=4.5.0 regression] missing headers as fatal breaks cproto logic Date: Mon, 29 Oct 2012 14:43:00 -0000 X-Bugzilla-Reason: CC X-Bugzilla-Type: changed X-Bugzilla-Watch-Reason: None X-Bugzilla-Product: gcc X-Bugzilla-Component: preprocessor X-Bugzilla-Keywords: X-Bugzilla-Severity: enhancement X-Bugzilla-Who: pierre.poissinger at gmail dot com X-Bugzilla-Status: WAITING X-Bugzilla-Priority: P3 X-Bugzilla-Assigned-To: unassigned at gcc dot gnu.org X-Bugzilla-Target-Milestone: --- X-Bugzilla-Changed-Fields: Message-ID: In-Reply-To: References: X-Bugzilla-URL: http://gcc.gnu.org/bugzilla/ Auto-Submitted: auto-generated Content-Type: text/plain; charset="UTF-8" MIME-Version: 1.0 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: 2012-10/txt/msg02692.txt.bz2 http://gcc.gnu.org/bugzilla/show_bug.cgi?id=55115 --- Comment #3 from Pierre Poissinger 2012-10-29 14:42:09 UTC --- Hi, Typically: The header is used, and contains all the 'visible' functions found in source BUT it's only needed: a) To perform real compilation: To check that function called are called correctly b) As export/header for the lib. cproto only preproc the file via -E option. Quick 'real life' example: myfuncs.h: Auto generated proto, generated out of a.c and b.c a.c: Define a(), calls b() - include 'myfuncs.h' b.c: Define b() - include 'myfuncs.h' => the "include" of the generated myfuncs.h file is to avoid local definitions + allow early check if functions signature changes for whatever reasons. Now - myfuncs.h being auto generated, during first build, prototyping will fail quickly due to "Missing headers"... This create some kind of a "Chicken/Egg" problem :-) If adding an option is annoying: Maybe then the 'fatal' should not be enforced if run is limited to preproc only, aka '-E' ?