Movatterモバイル変換


[0]ホーム

URL:


Jump to content
WikipediaThe Free Encyclopedia
Search

Portable C Compiler

From Wikipedia, the free encyclopedia
C compiler for Unix and Unix-like operating systems
Portable C Compiler
Original author(s)Stephen C. Johnson
Developer(s)AT&T Bell Laboratories
Initial release1979; 46 years ago (1979)
Stable release
1.1.0 / December 10, 2014; 10 years ago (2014-12-10)
Written inC
Operating systemUnix andUnix-like
TypeCCompiler
LicenseBSD License
Websiteweb.archive.org/web/20231212090621/http://pcc.ludd.ltu.se/Edit this at Wikidata

ThePortable C Compiler (also known aspcc or sometimespccm - portable C compiler machine) is an earlycompiler for theC programming language written byStephen C. Johnson ofBell Labs in the mid-1970s,[1] based in part on ideas proposed byAlan Snyder in 1973,[2][3]and "distributed asthe C compiler by Bell Labs... with the blessing ofDennis Ritchie."[4]

Being 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 debuted inSeventh Edition Unix and shipped withBSD Unix until the release of4.4BSD in 1994, when it was replaced by theGNU 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.[5] Anders Magnusson and Peter A Jonsson restarted development of pcc in 2007, rewriting it extensively to support theC99 standard.[6]

Features

[edit]

Key features of pcc are itsportability and improved diagnostic capabilities. Thecompiler was designed so that only a few of itssourcefiles aremachine-dependent. It is relatively robust tosyntax errors and performs more thorough validity checks than its contemporaries.[according to whom?]

The first C compiler, written byDennis Ritchie, used arecursive descent parser, incorporated specific knowledge about thePDP-11, and relied on an optional machine-specific optimizer to improve the assembly language code it generated. In contrast, Johnson's pccm was based on ayacc-generated parser 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.

Later versions of PCC, known within Bell Labs as "QCC" and "RCC," supported other target architecture models.[citation needed]

The language that PCC implements is an extended version ofK&R C thatBjarne Stroustrup has called "Classic C", incorporating thevoid return type (for functions that don't return any value), enumerations and structure assignment.[4]

Current version

[edit]

A new version of pcc, based on the original by Steve Johnson, is maintained[when?] by Anders Magnusson.[6] The compiler is provided under theBSD licence and its development is funded by a non-profit organization called BSD Fund. 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. <...> [I]t is also quite simple to port...

— Anders Magnusson[7]

This new version was added to theNetBSDpkgsrc andOpenBSD source trees in September 2007,[8] and later into the mainNetBSD source tree.[9] There had been some speculation that it might eventually be used to supplant the GNU C Compiler on BSD-based operating systems,[10] thoughFreeBSD[11][12] andNetBSD[13] are both looking toClang as a potential replacement, andTheo de Raadt ofOpenBSD asserts that pcc is not ready yet to be a gcc replacement, and the disposal of gcc is not top priority.[14] On December 29, 2009, pcc became capable of building a functional x86OpenBSD kernel image.[15]

pcc version 1.0 was released on 1 April 2011.[16]As of this release, the compiler supportsx86 andx86-64 processor architectures and runs onNetBSD,OpenBSD,FreeBSD, variousLinux distributions, andMicrosoft Windows.[17]Further development, including support for more architectures, andFORTRAN 77 andC++ front ends, is continuing as of 2022.

PCC was removed from the OpenBSDsource tree in 2012.[18] Development on it had stalled and no maintainer had stepped up to develop it into something that could make a practical alternative toGNU Compiler Collection.[19][20]

The latest version of pcc, namely 1.1.0, was released on 10 December 2014.[21]

See also

[edit]

References

[edit]
  1. ^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.doi:10.1145/512760.512771.S2CID 14390804.
  2. ^Snyder, A. (1975)."A Portable Compiler for the Language C".Master's Thesis. MIT, Cambridge, Mass. Archived fromthe original on 2006-09-05. Retrieved2006-07-19.
  3. ^Johnson, S.C. (1981).A Tour Through the Portable C Compiler. Unix Programmer's Manual, 7th edition, Volume 2. Holt, Rinehart and Winston.ISBN 0-03-061743-X.
  4. ^abStroustrup, Bjarne (2002).Sibling rivalry: C and C++(PDF) (Report). AT&T Labs.
  5. ^Ritchie, Dennis M. (1993)."The development of the C language".The second ACM SIGPLAN conference on History of programming languages. Cambridge, Massachusetts. pp. 201–208. Retrieved2008-12-30.At the start of the decade, nearly every compiler was based on Johnson'spcc; by 1985 there were many independently-produced compiler products.
  6. ^ab"pcc history".pcc - portable c compiler. 2010-06-21. Retrieved2012-06-26.
  7. ^Erdely, Mike (2007-09-15)."BSD Licensed PCC Compiler Imported".OpenBSD Journal. Retrieved2011-12-17.
  8. ^Moerbeek, Otto (2007-09-15)."CVS: cvs.openbsd.org: src".openbsd-cvs (Mailing list).
  9. ^Brownlee, David (2007-09-20)."CVS commit: src/dist/pcc".source-changes (Mailing list).
  10. ^"GCC Compiler Finally Supplanted by PCC?"./. 2007-09-17.
  11. ^Larabel, Michael (12 May 2012)."FreeBSD 10 To Use Clang Compiler, Deprecate GCC".Phoronix.Archived from the original on 10 April 2015. Retrieved23 April 2015.
  12. ^Brooks, Davis (5 November 2012)."HEADS UP: Clang now the default on x86" (Mailing list). Retrieved23 April 2015.
  13. ^Joerg, Sonnenberger (17 October 2013)."Importing LLVM/Clang" (Mailing list). Retrieved23 April 2015.
  14. ^Matzan, Jem (2007-10-15)."More on OpenBSD's new compiler".The Jem Report. Archived fromthe original on 2012-01-04. Retrieved2011-12-17.But that's never really been the agenda, see. Some people think we hate GNU code. But the thing is we hate large code, and buggy code that upstream does not maintain. That's the real problem… gcc gets about 5-6% slower every release, has new bugs, generates crappy code, and drives us nuts. This is just an attempt to see if something better can show up.
  15. ^de Weerd, Paul (2009-12-29)."Call for testing: pcc and the OpenBSD kernel".OpenBSD Journal. Retrieved2011-12-17.
  16. ^Magnusson, Anders (2011-04-01)."1.0 Release".Portable C Compiler. Retrieved2011-12-17.
  17. ^"BSD Fund: pcc fund".bsdfund.org. 2011-04-01. Archived fromthe original on 2009-01-05. Retrieved2012-06-26.
  18. ^Paul Irofti (2012-04-12)."CVS: cvs.openbsd.org: src".
  19. ^Peter Hessler (2012-06-18)."Re: Story behind PCC's removal?".
  20. ^Miod Vallat (2013-07-31)."Compilers in OpenBSD".
  21. ^Magnusson, Anders (2014-12-10)."1.1.0 Release".Portable C Compiler. Retrieved2022-04-22.

External links

[edit]
Features
Standard library
Implementations
Compilers
IDEs
Comparison with
other languages
Descendant
languages
Designer
TheNetBSD Project
Operating system
Related projects
Notable subsystems
File systems andstorage
Firewalls andnetworking
Retrieved from "https://en.wikipedia.org/w/index.php?title=Portable_C_Compiler&oldid=1268749473"
Categories:
Hidden categories:

[8]ページ先頭

©2009-2025 Movatter.jp