This is the mail archive of the
gcc-bugs@gcc.gnu.org
mailing list for the GCC project.
Re: cpp seems not to include # line "file" output for empty files
- To: Horst von Brand <vonbrand at sleipnir dot valparaiso dot cl>
- Subject: Re: cpp seems not to include # line "file" output for empty files
- From: Daniel Berlin <dberlin at redhat dot com>
- Date: 08 Oct 2000 23:46:07 -0400
- Cc: gcc-bugs at gcc dot gnu dot org
- References: <200010090214.e992E8G24291@sleipnir.valparaiso.cl>
Horst von Brand <vonbrand@sleipnir.valparaiso.cl> writes:
> Daniel Berlin <dberlin@redhat.com> said:
>
> [...]
>
> > If you want dependency info from cpp, use the switches to tell it to
> > give you dependency info.
>
> That may mean hacking up a bunch of unreadable Makefiles...
I'm confused as to how his existing solution doesn't already do this,
but anyway.
Wouldn't it just be easier and faster to scan for the includes, and use those,
rather than play games with preprocessors?
>
> > Also, if the file generates no output, then a.c really wasn't dependent
> > on it.
>
> Wrong. In the example the a.h file #defines something, which doesn't
> generate output but can influence the result of compiling a.c.
If a.c was using the thing from a.h, and it still generated the same
type of output, i'd call it a bug, with no problem.
As it stands, his example doesn't become influenced by the result of
the define, and thus, their is no problem with the preprocessor not
outputting it.
We both know his bug is likely resulting from recent preprocessor
work, and that he really needs to take the issue up with
bugzilla.redhat.com, and not gcc-bugs.
--Dan