On 30.08.2011 08:47, Stephan Bergmann wrote: > On Aug 29, 2011, at 9:26 PM, Pedro F. Giffuni wrote: >>> any reason why we build our own preprocessors and don't use the C >>> toolchain preprocessor that is already required to build OOo? >>> >> >> This is an important question. If we need another preprocessor >> there are options(1), but we need to now why. > > At least for idlc, I think the best solution would be to get rid of a > C preprocessor completely. Even if de-facto (if not also de-jure) > .idl files have always been passed through a C preprocessor, so in > theory could make use of all the C preprocessor's features, this has > practically always only been used for plain #include <…> or #include > "…" stuff (plus internal and external header guards, #ifndef > XXX/#define XXX/.../#endif and #ifndef XXX/#include "YYY"/#endif), I > think. > > So, it should be possible---without breaking backwards compatibility > in practice---to change idlc so that it ignores all #… lines except > for #include lines, which it then handles via a more efficient > mechanism than textual inclusion.
that's the question i never dared to ask ;) i hate cpp: it is an automated copy-paste mechanism to do things for which a real programming language provides a module system. let's get rid of it where possible. then we can also remove the ugly external header guards clutter. > Would still have to have a look at soltools/cpp, though... > > -Stephan regards, michael
