The Gnu Compiler Collection, Version 3.4
Posted May 7, 2004 18:43 UTC (Fri) by nobrowser
In reply to: The Gnu Compiler Collection, Version 3.4
Parent article: The Gnu Compiler Collection, Version 3.4
What are the good reasons?
In my own style, every header file is self-contained, #include-ing any other
headers that declare types and macros it mentions. This way people who edit
the top source file are free from worrying about the order of #include-s.
I dislike the idea of a single monolithic header file too, though, for a
different reason: it introduces unneeded dependencies. If you include the
monolithic header in all C files, and then modify _any_ header whatsoever,
everything will be recompiled.
Acutally, that's only true if you generate the dependencies automatically.
If you can keep the details of which source depends on which header and
maintain Makefiles manually you're fine. Still a headache, though.
to post comments)