builtins and automatic defines

KW Heuer kwh at bentley.UUCP
Wed May 14 12:01:24 AEST 1986


In article <1232 at utcs.uucp> utcs!flaps (Alan J Rosenthal) writes:
>Well I sure hope no one sticks in such a thing without telling me!
>Any such #include or #define things should not only be optional, they
>should have to be explicit.  So perhaps instead of merely beginning every
>program with #include <stdio.h>, you can also have #include <builtins.h>.
>
>*I* won't #include it, though...

They should be semantically identical, so what do you care whether it's
optimized by default?

I wonder if perhaps <stdio.h> (and <builtins.h>) should be included by
default, with an explicit "#exclude" to disable.  (Cf. "#undef".)  Probably
tricky to implement -- don't do the automatic "#include" until checking for
"#exclude", which must be at the top of the file (after whitespace)?

I had much the same attitude when I learned of the (then) new features that
allowed structure copy/call-by-value/return-by-value.  I wasn't using them
(of course, since they were new), and I wanted to see an error if I used one
by mistake (forgotten "&").  I was hoping for a compatibility option of some
type, like EO in TECO-10.  (A nice feature that allowed TECO to simulate an
older version of itself, so as not to obsolete all old macros.)

Karl W. Z. Heuer (ihnp4!bentley!kwh), The Walking Lint



More information about the Comp.lang.c mailing list