Code Bloat g++
Per Bothner
per@bothner.com
Mon Feb 21 00:00:00 GMT 2000
Zack Weinberg <zack@wolery.cumb.org> writes:
> Problem is, this isn't the precompiled header scheme I had in mind. I
> was intending to do it with one monster precompiled header for an
> entire *project*. That sidesteps the semantic nasties associated with
> what goes in foo.hx versus what goes in bar.hx when bar.h includes
> foo.h, what happens when you play games with #defining tokens used in
> foo.h, and so on.
My idea works just as well in this model, I think. If you create "one
monster precompiled header for an entire *project*", you can at the
same time create one monster .o file containg debug symbols for an
entire project, in the same way that I proposed, except the "unit"
is the combination of headers.
> I also was contemplating a one-to-one scheme, but it didn't do any
> work beyond basic tokenization.
>
> You still have to worry about things like
>
> #define _POSIX_SOURCE
> #include <unistd.h>
There is a fair bit of that in the C headers, but not in the C++
headers, I believe, nor in most "project" headers.
Logically, the #ifdef _POSIX_OURCE junk is rather like multi-lib-ing ...
--
--Per Bothner
per@bothner.com http://www.bothner.com/~per/
More information about the Gcc
mailing list