modula3 / cm3

Critical Mass Modula-3
http://modula3.github.io/cm3/
Other
139 stars 25 forks source link

Where is the generated C source file when you compile a program? #1084

Closed jpgpng closed 2 years ago

jpgpng commented 2 years ago

I want to read that source. The file _m3main.cpp doesn't contain anything useful. I'm sure it's not the translated C source.

VictorMiasnikov commented 2 years ago

cm3[.exe] have flag for this

RodneyBates commented 2 years ago

On 9/22/22 03:55, jpgpng wrote:

I want to read that source. The file _m3main.cpp doesn't contain anything useful. I'm sure it's not the translated C source.

Normally, the compiler removes almost all generated intermediate files, by the end of the compilation process.  Add the "-keep" option to your cm3 command to override this. Then all the intermediate files will be left in the build directory.

Note that only if you use the C backend will there be files in C.  There are some backend modes that leave files, named ending in "c", that are actually CM3's front-end-to-back-end intermediate representation.

— Reply to this email directly, view it on GitHub https://github.com/modula3/cm3/issues/1084, or unsubscribe https://github.com/notifications/unsubscribe-auth/ABSVZNF5HGV4HP5TUICTYKDV7QNHDANCNFSM6AAAAAAQS2LU2Q. You are receiving this because you are subscribed to this thread.Message ID: @.***>