Is C ++ built on top of C?

C ++ code converted to C before compilation?

+6
source share
6 answers

Several C ++ compilers (original cfront, Comeau C ++) use C as an intermediate language at compile time. Most C ++ compilers use other intermediate languages ​​(e.g. llvm).

Edit: Since there seem to be some misunderstandings in the story: β€œC with classes” began with the use of the β€œCpre” preprocessor. At that time it was considered strictly as a dialect of the C language, and not as a separate language in itself. In December 1983, people began to consider it as a separate language, and the name C ++ was invented. As it turned out, the development of cfront began in April 1983, so the version available for use became available (for a few select ones) at about the same time that the name "C ++" entered. This seems to be basically a coincidence.

Regarding the output of C as output, this was fairly common on Unix. For example, the Berkeley Pascal compiler and at least a couple of Fortran compilers also returned C as output.

Cpre Cfront . C , Cpre - . C , . , , , C Cpre.

Cfront, , , ( ), C. C , CFront , ..

, 2 " " C++ "C " ( , ).

+22

, , , . C ( ++) CFront C.

+13

.

++ . C-, C.

+6

++ . , ++ 1980- .

+5

. .

, OOP, #, , CI, Vala.

+2

, , , ++ C, .. c- ++, ? , , ...

, C , ++ - , ...

- - ?

thats , , C ++ - ...

+2

All Articles