This is the mail archive of the gcc-bugs@gcc.gnu.org mailing list for the GCC project.


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]

Re: cpp seems not to include # line "file" output for empty files


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


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]