Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

Make GDC front end emit intermediate C/C++ code?

Tags:

c++

c

gcc

mingw

d

While investigating the D language, I came across GDC, a D Compiler for GCC. I downloaded the version for MinGW from here:

http://sourceforge.net/projects/dgcc/files/

Documentation was almost nonexistent, but it did say that most of the command line switches were the same as for the GCC compiler. However, that doesn't help me much, since I don't usually build with GCC.

GDC is described as a "GCC front end". That makes me think that at some point it has to generate intermediate C++ or C that the GCC compiler can actually swallow. I believe that this is how GCC compiles Objective-C programs.

What I want to know is this: Is there a way to get GDC to emit the intermediate C/C++ code as files that I can then inspect and compile by hand with GCC/MinGW?

like image 928
Buggieboy Avatar asked Dec 04 '22 15:12

Buggieboy


1 Answers

No.

Front-ends to GCC generate a language-independent representation that is then compiled directly to assembly. This is the case for the C, C++, Obj-C, D, Fortran, Java, Ada, and other front-ends. There is no intermediate C or C++ representation, nor can one be generated.

like image 197
greyfade Avatar answered Dec 09 '22 14:12

greyfade