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
Daniel Berlin wrote:-
> Really?
> That's actually pretty surprising.
> I've always just used 2 regexes to scan for #include's, and generate
> the tree that way.
> Is there a particular reason this isn't a good solution that i should
> be aware of?
I don't think that would work very well:
o You would have false dependencies from #includes in skipped
conditional blocks.
o You cannot handle #include MACRO, which does occur in e.g. the
XFree86 code.
You really need to be the preprocessor to get the right dependencies.
Neil.