This is the mail archive of the
gcc-bugs@gcc.gnu.org
mailing list for the GCC project.
[Bug preprocessor/55115] [>=4.5.0 regression] missing headers as fatal breaks cproto logic
- From: "pierre.poissinger at gmail dot com" <gcc-bugzilla at gcc dot gnu dot org>
- To: gcc-bugs at gcc dot gnu dot org
- Date: Mon, 29 Oct 2012 14:42:09 +0000
- Subject: [Bug preprocessor/55115] [>=4.5.0 regression] missing headers as fatal breaks cproto logic
- Auto-submitted: auto-generated
- References: <bug-55115-4@http.gcc.gnu.org/bugzilla/>
http://gcc.gnu.org/bugzilla/show_bug.cgi?id=55115
--- Comment #3 from Pierre Poissinger <pierre.poissinger at gmail dot com> 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' ?