[Bug preprocessor/55115] [>=4.5.0 regression] missing headers as fatal breaks cproto logic

manu at gcc dot gnu.org gcc-bugzilla@gcc.gnu.org
Mon Oct 29 14:54:00 GMT 2012


http://gcc.gnu.org/bugzilla/show_bug.cgi?id=55115

--- Comment #5 from Manuel López-Ibáñez <manu at gcc dot gnu.org> 2012-10-29 14:53:24 UTC ---
(In reply to comment #3)
> 
> 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 :-)

So do "touch myfuncs.h" before the first file is built. Or invoke gcc -E in a
temp file for which you comment out the #include "myfuncs.h". Or make cproto do
any of this automatically.

Or even better, use libClang <http://clang.llvm.org/docs/Tooling.html> to do
what you want instead of parsing GCC errors, which are likely to change in
unexpected ways.



More information about the Gcc-bugs mailing list