This is the mail archive of the gcc-help@gcc.gnu.org mailing list for the GCC project.


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]
Other format: [Raw text]

Re: Single line conditional compiles


Hi Gerrit,

> I understand why it does not work - I am looking for a solution, not an
explanation :)

Well, that's good, because you saved me time explaining.  :-)

One solution is to run the preprocessor twice.

The first time it does all the normal preprocessor things (pulling in the
#include, expanding macros, yada yada yada), including embedding those
now-invalid comments into the post-preprocessed output.

The second time removes those introduced comments.

Voila!

--Eljay



Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]