Peter Gerwinski peter@gerwinski.de writes:
Multiple compilations in one file.
One source file contains one program and several units, or an interface and an implementation module, or whatever which has more than one `end.' (please note the dot).
Hammering this behaviour of GPC into the GCC/EGCS backend is a nontrivial change which I do not expect the GCC steering committee to accept. (They already rejected much less crucial changes.) Thus, removing this feature would probably be necessary for full integration into GCC/EGCS.
Can the `program'/`end.', `unit'/`end.' tokens be treated like C #ifdef, #endif pairs such that there must be an equal number of each within a source file otherwise it is flagged as an error.
Perhaps the pre-processor should combine a program and it's units in much the same way as you would #include a file in C rather than leaving it up to the compiler.
Nick.