A solution to the multiple inclusion problem

Doug Gwyn gwyn at smoke.BRL.MIL
Wed Oct 25 05:46:06 AEST 1989


In article <14240 at well.UUCP> nagle at well.UUCP (John Nagle) writes:
>      It's been proposed that the semantics of "#include" be changed to 
>avoid all multiple inclusion.  But this is controversial, and would require
>ANSI approval.

It's not especially controversial, because as you imply it would be a
change to a well-defined characteristic of the C language.  Thus when
it was proposed to X3J11, we had little difficulty in determining that
the proposal must be rejected.  Several people attested to the fact
that they have existing code that requires the existing semantics.

>      I propose a solution via compiler optimization.

Your solution does not at all seem to me to preserve existing semantics.



More information about the Comp.lang.c mailing list