Re: This is really Ridiculous

Magnus Ahltorp (Magnus.Ahltorp@abc.se)
Mon, 29 Jul 1996 15:09:57 +0200 (MET DST)


> Is there some automated way to make sure all different possible
> configurations (or at least a frequently-used subset of those) will
> compile?
> If Linus would only test the code to make sure it compiles in different
> configurations, that would catch many of the stupid little "bugs" we
> always see.

Think of a situation where a #define is used this way:

#ifdef FOO_DEFINE

/* do something */

#endif

[...]

#ifndef FOO_DEFINE

/* do something */

#endif

Then it isn't possible to determine whether this compiles if the code is
not compiled twice, one with the symbol defined and one with the symbol
not defined. Certainly, many symbols are not used in this way, but are
just used to enable code, but you don't need many of these before it takes
ages to test them, since the time grows exponentially with the number of
symbols. Only 10 symbols takes 1024 runs through the code.

/Magnus

magnus@abc.se

ABC Computer Club, Sweden