Cfront

Cfront

Cfront was the original compiler for C++ (then known as "C with Classes") from around 1983, which converted C++ to C; developed by Bjarne Stroustrup. The preprocessor did not understand all of the language and much of the code was written via translations. Cfront had a complete parser, built symbol tables, and built a tree for each class, function, etc. Cfront was based on CPre (C with classes compiler, which started at 1979).

As Cfront was written in C++, it was a challenge to bootstrap on a machine without a C++ compiler/translator. Along with the Cfront C++ sources, a special "half-preprocessed" version of the C code resulting from compiling Cfront with itself was also provided. This C code was to be compiled with the native C compiler, and the resulting executable could then be used to compile the Cfront C++ sources.

Most of the porting effort in getting Cfront running on a new machine was related to standard I/O. Cfront's C++ streams were closely tied in with the C library's buffered I/O streams, but there was little interaction with the rest of the C environment. The compiler could be ported to most System V derivatives without many changes, but BSD-based systems usually had many more variations in their C libraries and associated stdio structures.

Cfront defined the language until circa 1990, and many of the more obscure corner cases in C++ were related to its C++-to-C translation approach. A few remnants of Cfront's translation method are still found in today's C++ compilers; name mangling was originated by Cfront, as the relatively primitive linkers at the time did not support type information in symbols, and some template instantiation models are derived from Cfront's early efforts. C++ (and Cfront) was directly responsible for many improvements in Unix linkers and object file formats, as it was the first widely-used language which required link-time type checking, weak symbols, and other similar features.

Cfront 4.0 was abandoned in 1993 after a failed attempt to add exception support.[1] The C++ language had grown beyond its capabilities; however a compiler with similar approach became available later, namely Comeau C/C++.

References

  1. ^ Scott Meyers, The Most Important C++ Software...Ever, 2006

External links


Wikimedia Foundation. 2010.

Игры ⚽ Поможем написать реферат

Look at other dictionaries:

  • C++ — У этого термина существуют и другие значения, см. C. См. также: Си (язык программирования) C++ Семантика: мультипарадигмальный: объектно ориентированное, обобщённое, процедурное, метапрограммирование Тип исполнения: компилируемый Появился в …   Википедия

  • C++ — Paradigmen: Multiparadigmen (funktional, generisch, imperativ, objektorientiert, prozedural, strukturiert) Erscheinungsjahr: 1979 Entwickler: Bjarne Stroustrup …   Deutsch Wikipedia

  • C-Plusplus — C++ Paradigmen: imperativ, strukturiert, objektorientiert, generisch Erscheinungsjahr: 1983 Entwickler: Bjarne Stroustrup …   Deutsch Wikipedia

  • C-plus-plus — C++ Paradigmen: imperativ, strukturiert, objektorientiert, generisch Erscheinungsjahr: 1983 Entwickler: Bjarne Stroustrup …   Deutsch Wikipedia

  • C plus plus — C++ Paradigmen: imperativ, strukturiert, objektorientiert, generisch Erscheinungsjahr: 1983 Entwickler: Bjarne Stroustrup …   Deutsch Wikipedia

  • Cplusplus — C++ Paradigmen: imperativ, strukturiert, objektorientiert, generisch Erscheinungsjahr: 1983 Entwickler: Bjarne Stroustrup …   Deutsch Wikipedia

  • С++ — См. также: Си (язык программирования) C++ Семантика: мультипарадигмальный: объектно ориентированное, обобщённое, процедурное, метапрограммирование Тип исполнения: компилируемый Появился в: 1985 г. Автор(ы): Бьёрн Страуструп …   Википедия

  • Compiler — This article is about the computing term. For the anime, see Compiler (anime). A diagram of the operation of a typical multi language, multi target compiler A compiler is a computer program (or set of programs) that transforms source code written …   Wikipedia

  • Exception handling — is a programming language construct or computer hardware mechanism designed to handle the occurrence of exceptions, special conditions that change the normal flow of program execution. Programming languages differ considerably in their support… …   Wikipedia

  • C++ — The C++ Programming Language, written by its architect, is the seminal book on the language. Paradigm(s) Multi paradigm:[1] procedural …   Wikipedia

Share the article and excerpts

Direct link
Do a right-click on the link above
and select “Copy Link”