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: "redi at gcc dot gnu.org" <gcc-bugzilla at gcc dot gnu dot org>
- To: gcc-bugs at gcc dot gnu dot org
- Date: Mon, 29 Oct 2012 14:29:44 +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 #2 from Jonathan Wakely <redi at gcc dot gnu.org> 2012-10-29 14:29:44 UTC ---
(In reply to comment #1)
> If the headers do nothing, just delete them? If the headers do something, how
> can you preprocess the file without the info from the headers?
That won't work, I believe cproto parses the errors produced by GCC and figures
out which declarations are missing based on the errors, then creates a header
containing those declarations.
Adding an option just for cproto is definitely not a good idea, just fix cproto
instead. The right answer seems to be to create a directory of empty files
with the names of the missing headers and point GCC to it with -I then cproto
can proceed as normal, and generate replacements for the empty files.
Refusing to compile when a header is missing is a huge improvement on the old
behaviour.