This is the mail archive of the gcc@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: Projects for beginners


On 01-Feb-2001, James Dennett <jdennett@acm.org> wrote:
> Richard's comments are, IMO, wrong.  The reason is that we should
> be able to include any header "x.h" without having to know about
> which headers it needs; for any header "x.h" the following should
> be a legal translation unit:
> 
> /* xtest.c -- Test that "x.h" is self-contained */
> #include "x.h"
> /* EOF */

I agree.

For the Mercury runtime library, we have a rule in the Makefile that
checks this automatically, by creating such files and compiling them.
This rule is invoked by our nightly test script.

It might be a good idea to do the same kind of thing for GCC.
Probably starting off with only a very small list of header files
for which the test is run, but it could be extended over time.

-- 
Fergus Henderson <fjh@cs.mu.oz.au>  |  "I have always known that the pursuit
                                    |  of excellence is a lethal habit"
WWW: <http://www.cs.mu.oz.au/~fjh>  |     -- the last words of T. S. Garp.

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