Portable C Compiler
From Wikipedia, the free encyclopedia
Portable C Compiler | |
---|---|
Latest release | 0.9.9 / January 27, 2008 |
Written in | C |
OS | Unix-like |
Genre | C Compiler |
License | BSD License |
Website | http://pcc.ludd.ltu.se/ |
The Portable C Compiler (also known as pcc or sometimes pccm - portable C compiler machine) was an early compiler for the C programming language written by Stephen C. Johnson of Bell Labs[1] in mid-1970s—based in part on ideas from earlier work by Alan Snyder in 1973.[2][3]
One of the first compilers that could easily be adapted to output code for different computer architectures, the compiler had a long life span. It shipped with BSD Unix until the release of 4.4BSD in 1994—which replaced it with the GNU C Compiler. It was very influential in its day, so much so that at the beginning of the 1980s, the majority of C compilers were based on it.[4]
Contents |
[edit] Features
The keys to the success of pcc were its portability and improved diagnostic capabilities:
- The compiler was designed so that only a few of its source files were machine-dependent.
- It was relatively robust to syntax errors and performed more thorough validity checks.
The first C compiler, written by Dennis Ritchie, had used a recursive descent parser, incorporated specific knowledge about the PDP-11, and relied on an optional machine-specific optimizer to improve the assembly-language code it had generated. In contrast, Johnson's "pcc" was based on a yacc parser generator and used a more general target machine model. Both compilers produced target-specific assembly language code, which they then assembled to produce linkable object modules.
[edit] Current version
A new version of pcc based on the original by S. C. Johnson is now maintained by Anders Magnusson. The compiler is provided under the BSD license. According to Magnusson:
“ | …The big benefit of it (apart from that it's BSD licensed, for license geeks) is that it is fast, 5-10 times faster than gcc, while still producing reasonable code …it is also quite simple to port… [5] | ” |
This new version was added to the NetBSD pkgsrc and OpenBSD source trees in September 2007,[6] and later into the main NetBSD source tree,[7] and there has been some speculation that it might eventually be used to supplant the GNU C Compiler on BSD-based operating systems.[8]
[edit] References
- ^ Johnson, S.C. (1978). A portable compiler: theory and practice. Proceedings of the 5th ACM SIGACT-SIGPLAN symposium on Principles of programming languages. Tucson, Arizona. 97-104.
- ^ Snyder, A. (1975). A Portable Compiler for the Language C. Master’s Thesis. M.I.T., Cambridge, Mass..
- ^ Johnson, S.C. (1981). A Tour Through the Portable C Compiler. Unix Programmer's Manual, 7th edition, Volume 2.
- ^ Ritchie, Dennis M. (1993). The development of the C language. The second ACM SIGPLAN conference on History of programming languages. Cambridge, Massachusetts. 201-208.
- ^ BSD Licensed PCC Compiler Imported
- ^ 'CVS: cvs.openbsd.org: src' - MARC
- ^ source-changes: CVS commit: src/dist/pcc
- ^ Slashdot | GCC Compiler Finally Supplanted by PCC?