Mail Archives: djgpp/1995/08/23/12:15:35
Eli Zaretskii <eliz AT is DOT elta DOT co DOT il> writes:
>On Mon, 14 Aug 1995, Hakansson Magnus, Telelarm wrote:
>> Is it possible to preserve an intermediate C file in a C++ compilation?
>>
>> I want to keep the C file because a want a special C compiler compile it for
>> an
>> embedded system.
>There is a GCC switch called -save-temps which will cause GCC to not
>delete its intermediate files. I don't know if that includes what you
>want.
It won't: g++ doesn't ever construct C source from C++ code, so you won't
be able to keep it either. (As an aside: -save-temps really is a good tool
for solving difficult problems sometimes, esp. when the preprocessor does
something unexpected). If you *really* want C built from C++, Magnus,
you'll have to use cfront (already mentioned here). A better idea might
be to build gcc/g++ as a cross-compiler for your embedded system, but
that could be *much* work for you.
Hope this helps
Hans-Bernhard Broeker (Aachen, Germany)
- Raw text -