请输入您要查询的百科知识:

 

词条 Portable C Compiler
释义

  1. Features

  2. Current version

  3. See also

  4. References

  5. External links

{{Infobox software
| name = Portable C Compiler
| logo =
| screenshot =
| caption =
| developer =
| latest release version = 1.1.0
| latest release date = {{Start date and age|2014|12|10}}
| latest preview version =
| latest preview date =
| operating system = Unix-like
| programming language = C
| genre = C Compiler
| license = BSD License
| website = {{URL|pcc.ludd.ltu.se}}
}}

The Portable C Compiler (also known as pcc or sometimes pccm - portable C compiler machine) is an early compiler for the C programming language written by Stephen C. Johnson of Bell Labs in the mid-1970s,[1] based in part on ideas proposed by Alan Snyder in 1973,[2][3]

and "distributed as the C compiler by Bell Labs... with the blessing of Dennis Ritchie."[4]

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 in Seventh Edition Unix and shipped with BSD Unix until the release of 4.4BSD in 1994, when it was replaced by 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] Anders Magnusson and Peter A Jonsson restarted development of pcc in 2007, rewriting it extensively to support the C99 standard.[5]

Features

The keys to the success{{According to whom?|date=October 2018}} 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 than its contemporaries.{{According to whom?|date=October 2018}}

The first C compiler, written by Dennis Ritchie, 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 generated. In contrast, Johnson's pccm was based on a yacc-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|date=June 2012}}

The language that PCC implemented was an extended version of K&R C that Bjarne Stroustrup has called "Classic C", incorporating the void return type (for functions that don't return any value), enumerations and structure assignment.[6]

Current version

A new version of pcc, based on the original by Steve Johnson, is now maintained by Anders Magnusson.[5] The compiler is provided under the BSD licence and its development is funded by a non-profit organization called BSD Fund. According to Magnusson:

{{quotation|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 the NetBSD pkgsrc and OpenBSD source trees in September 2007,[8] and later into the main NetBSD 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] though FreeBSD[11][12] and NetBSD[13] are both looking to Clang as a potential replacement, and Theo de Raadt of OpenBSD 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 x86 OpenBSD kernel image.[15]

pcc version 1.0 was released on 1 April 2011.[16]

As of this release, the compiler supports x86 and x64 processor architectures and runs on NetBSD, OpenBSD, FreeBSD, various Linux distributions, and Microsoft Windows.[17]

Further development, including support for more architectures, and FORTRAN 77 and C++ front ends, is continuing.

PCC was removed from the OpenBSD source 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 to GNU Compiler Collection.[19][20]

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

See also

{{Portal|Free and open-source software}}
  • Amsterdam Compiler Kit
  • Clang
  • Open Watcom

References

1. ^{{cite web | author=Johnson, S.C. | year=1978 | title=A portable compiler: theory and practice | work=Proceedings of the 5th ACM SIGACT-SIGPLAN symposium on Principles of programming languages. Tucson, Arizona. | pages=97–104 | url=http://doi.acm.org/10.1145/512760.512771 | authorlink=Stephen C. Johnson }}
2. ^{{cite web | author=Snyder, A. | year=1975 | title=A Portable Compiler for the Language C | work=Master's Thesis. MIT, Cambridge, Mass. | url=http://www.lcs.mit.edu/publications/specpub.php?id=717 | authorlink=Alan Snyder (computer scientist)}}
3. ^{{cite web | author=Johnson, S.C. | year=1981 | title=A Tour Through the Portable C Compiler | work=Unix Programmer's Manual, 7th edition, Volume 2 | isbn=0-03-061743-X | url=http://citeseer.ist.psu.edu/johnson81tour.html | authorlink=Stephen C. Johnson }}
4. ^{{cite web | author=Ritchie, Dennis M. | year=1993 | title=The development of the C language | work=The second ACM SIGPLAN conference on History of programming languages. Cambridge, Massachusetts. | pages=201–208 | url=http://plan9.bell-labs.com/who/dmr/chist.html |accessdate=2008-12-30 |quote=At the start of the decade, nearly every compiler was based on Johnson's pcc; by 1985 there were many independently-produced compiler products. | authorlink=Dennis Ritchie }}
5. ^{{cite web|url = http://pcc.ludd.ltu.se/pcc_history/|title = pcc history|work = pcc - portable c compiler|date = 2010-06-21|accessdate = 2012-06-26}}
6. ^{{cite report |first=Bjarne |last=Stroustrup |authorlink=Bjarne Stroustrup |title=Sibling rivalry: C and C++ |publisher=AT&T Labs |number=TD-54MQZY |year=2002 |url=http://stroustrup.com/sibling_rivalry.pdf}}
7. ^{{cite web|url = http://undeadly.org/cgi?action=article&sid=20070915195203&mode=expanded|title = BSD Licensed PCC Compiler Imported|first = Mike|last = Erdely|work = OpenBSD Journal|date = 2007-09-15|accessdate = 2011-12-17}}
8. ^{{cite mailing list|url = http://marc.info/?l=openbsd-cvs&m=118988004013923&w=2|title = CVS: cvs.openbsd.org: src|first = Otto|last = Moerbeek|mailinglist = openbsd-cvs|date = 2007-09-15}}
9. ^{{cite mailing list|url = http://mail-index.netbsd.org/source-changes/2007/09/20/0005.html|title = CVS commit: src/dist/pcc|first = David|last = Brownlee|mailinglist = source-changes|date = 2007-09-20}}
10. ^{{cite web|url = http://developers.slashdot.org/article.pl?sid=07/09/17/1451239|work = /.|title = GCC Compiler Finally Supplanted by PCC?|date = 2007-09-17}}
11. ^{{cite web |url=https://www.phoronix.com/scan.php?page=news_item&px=MTEwMjI |title=FreeBSD 10 To Use Clang Compiler, Deprecate GCC |last=Larabel |first=Michael |publisher=Phoronix |date=12 May 2012 |deadurl=no |archiveurl=https://web.archive.org/web/20150410143519/http://www.phoronix.com/scan.php?page=news_item&px=MTEwMjI |archivedate=10 April 2015 |accessdate=23 April 2015 }}
12. ^{{cite mailing list |url=http://lists.freebsd.org/pipermail/freebsd-current/2012-November/037610.html |title=HEADS UP: Clang now the default on x86 |date=5 November 2012 |accessdate=23 April 2015 |last=Brooks |first=Davis}}
13. ^{{cite mailing list |url=http://mail-index.netbsd.org/tech-toolchain/2013/10/17/msg002117.html |title=Importing LLVM/Clang |date=17 October 2013 |accessdate=23 April 2015 |last=Joerg |first=Sonnenberger}}
14. ^{{cite web|url = http://www.thejemreport.com/more-on-openbsds-new-compiler/|title = More on OpenBSD’s new compiler|first = Jem|last = Matzan|work = The Jem Report|date = 2007-10-15|accessdate = 2011-12-17|quote = 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. ^{{cite web|url = http://undeadly.org/cgi?action=article&sid=20091228231142|title = Call for testing: pcc and the OpenBSD kernel|first = Paul|last = de Weerd|work = OpenBSD Journal|date = 2009-12-29|accessdate = 2011-12-17}}
16. ^{{cite web|url = http://pcc.ludd.ltu.se/1.0_release/|title = 1.0 Release|first = Anders|last = Magnusson|work = Portable C Compiler|date = 2011-04-01|accessdate = 2011-12-17}}
17. ^{{cite web|url = http://www.bsdfund.org/projects/pcc/|title = BSD Fund: pcc fund|work = bsdfund.org|date = 2011-04-01|accessdate = 2012-06-26}}
18. ^{{cite web|url=http://marc.info/?l=openbsd-cvs&m=133423160431049&w=2|author=Paul Irofti|date=2012-04-12|title=CVS: cvs.openbsd.org: src}}
19. ^{{cite web|url=http://marc.info/?l=openbsd-misc&m=134005622621532&w=2|title=Re: Story behind PCC's removal?|author=Peter Hessler|date=2012-06-18}}
20. ^{{cite web|url=http://marc.info/?l=openbsd-misc&m=137530560232232&w=2|title=Compilers in OpenBSD|author=Miod Vallat|date=2013-07-31}}
21. ^{{cite web|url = ftp://pcc.ludd.ltu.se/pub/pcc-releases/|title = 1.1.0 Release|first = Anders|last = Magnusson|work = Portable C Compiler|date = 2014-12-10|accessdate = 2014-12-10}}

External links

  • {{official website|pcc.ludd.ltu.se}}
  • Archive at TUHS
{{CProLang}}

3 : C compilers|Free compilers and interpreters|Software using the BSD license

随便看

 

开放百科全书收录14589846条英语、德语、日语等多语种百科知识,基本涵盖了大多数领域的百科知识,是一部内容自由、开放的电子版国际百科全书。

 

Copyright © 2023 OENC.NET All Rights Reserved
京ICP备2021023879号 更新时间:2024/11/12 14:55:55