Portable C compiler

from Wikipedia, the free encyclopedia
Portable C compiler
Basic data

developer PCC team
Current  version 1.1.0
(December 10, 2014)
operating system UNIX , OpenBSD , NetBSD , GNU / Linux , etc. a.
programming language C.
category Compiler
License BSD
pcc website

The Portable C Compiler (also known as pcc and pccm - portable C compiler machine -) is one of the first compilers for the C programming language . It was developed from the mid-1970s by Stephen C. Johnson , an employee of Bell Labs , and is based in part on work by Alan Snyder from 1973.

history

pcc was formative for its time as it was one of the first compilers that could be easily adapted to generate machine code for different architectures. In the early 1980s, the majority of C compilers were based on pcc; the lifespan of pcc was extremely long - in 1990 it was still delivered with 4.3BSD-Reno - until it was finally switched from 4.4BSD to the GNU C compiler .

The essential properties and also decisive for the success of pcc are platform independence and good debugging options:

  • The authoritative design of the compiler was designed so that only a few parts of its sources were machine-specific.
  • It is very insensitive to syntax errors and does not create invalid programs.
  • It isolates machine-specific program parts that can be programmed manually in assembler for the respective target.
  • The first compiler run was already self-optimizing.

All of these properties were completely new at the time; the first C compiler (written by Dennis Ritchie ) used recursive descent , was strongly tied to the architecture of the PDP-11 and required another, machine-specific run to optimize the code to be generated. In contrast to this stood Johnson's multi-pass compiler, which analyzed memory accesses of the generated program parts and generated code that had a minimum of memory accesses.

Later development

Even after the turn of the millennium, pcc experienced a kind of renaissance. Based on the work of SC Johnson, a team led by Anders Magnusson is developing the compiler further and replacing a large part of the code; pcc now supports C99 and is under the BSD license. At the time, these efforts attracted more attention from the developers of OpenBSD , who wanted to replace the previously used GNU C compiler , primarily for reasons of quality assurance and licensing concerns.

literature

Web links

Individual evidence

  1. Stephen C. Johnson: A portable compiler: theory and practice . 1978, doi: 10.1145 / 512760.512771
  2. A. Snyder: A portable compiler for the language C . ( Memento of the original from September 5, 2006 in the Internet Archive ) Info: The archive link was inserted automatically and has not yet been checked. Please check the original and archive link according to the instructions and then remove this notice. 1975 @1@ 2Template: Webachiv / IABot / www.lcs.mit.edu
  3. Stephen C. Johnson: A Tour Through the Portable C Compiler . 1981
  4. ^ Dennis M. Ritchie: The Development of the C Language .
  5. Jem Matzan: More on OpenBSD's new compiler . ( Memento of the original from October 17, 2007 in the Internet Archive ) Info: The archive link was inserted automatically and has not yet been checked. Please check the original and archive link according to the instructions and then remove this notice. The Jem Report, October 15, 2007 @1@ 2Template: Webachiv / IABot / www.thejemreport.com