Portable C Compiler

Portable C Compiler
Original author(s)Stephen C. Johnson
Developer(s)AT&T Bell Laboratories
Initial release1979; 45 years ago (1979)
Stable release
1.1.0 / December 10, 2014; 9 years ago (2014-12-10)
Written inC
Operating systemUnix and Unix-like
TypeC Compiler
LicenseBSD License
Websiteweb.archive.org/web/20231212090621/http://pcc.ludd.ltu.se/ Edit this at Wikidata

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]

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 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.[5] Anders Magnusson and Peter A Jonsson restarted development of pcc in 2007, rewriting it extensively to support the C99 standard.[6]

Features

Key features of pcc are its portability and improved diagnostic capabilities. The compiler was designed so that only a few of its source files are machine-dependent. It is relatively robust to syntax errors and performs more thorough validity checks than its contemporaries.[according to whom?]

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]

The language that PCC implements is 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.[4]

Current version

A new version of pcc, based on the original by Steve Johnson, is maintained[when?] by Anders Magnusson.[6] The compiler is provided under the BSD 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 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 x86-64 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 as of 2022.

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

References

  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 from the original on 2006-09-05. Retrieved 2006-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. ^ a b Stroustrup, 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. Retrieved 2008-12-30. At the start of the decade, nearly every compiler was based on Johnson's pcc; by 1985 there were many independently-produced compiler products.
  6. ^ a b "pcc history". pcc - portable c compiler. 2010-06-21. Retrieved 2012-06-26.
  7. ^ Erdely, Mike (2007-09-15). "BSD Licensed PCC Compiler Imported". OpenBSD Journal. Retrieved 2011-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. Retrieved 23 April 2015.
  12. ^ Brooks, Davis (5 November 2012). "HEADS UP: Clang now the default on x86" (Mailing list). Retrieved 23 April 2015.
  13. ^ Joerg, Sonnenberger (17 October 2013). "Importing LLVM/Clang" (Mailing list). Retrieved 23 April 2015.
  14. ^ Matzan, Jem (2007-10-15). "More on OpenBSD's new compiler". The Jem Report. Archived from the original on 2012-01-04. Retrieved 2011-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. Retrieved 2011-12-17.
  16. ^ Magnusson, Anders (2011-04-01). "1.0 Release". Portable C Compiler. Retrieved 2011-12-17.
  17. ^ "BSD Fund: pcc fund". bsdfund.org. 2011-04-01. Archived from the original on 2009-01-05. Retrieved 2012-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. Retrieved 2022-04-22.

Read other articles:

密西西比州 哥伦布城市綽號:Possum Town哥伦布位于密西西比州的位置坐标:33°30′06″N 88°24′54″W / 33.501666666667°N 88.415°W / 33.501666666667; -88.415国家 美國州密西西比州县朗兹县始建于1821年政府 • 市长罗伯特·史密斯 (民主党)面积 • 总计22.3 平方英里(57.8 平方公里) • 陸地21.4 平方英里(55.5 平方公里) • …

此条目序言章节没有充分总结全文内容要点。 (2019年3月21日)请考虑扩充序言,清晰概述条目所有重點。请在条目的讨论页讨论此问题。 哈萨克斯坦總統哈薩克總統旗現任Қасым-Жомарт Кемелұлы Тоқаев卡瑟姆若马尔特·托卡耶夫自2019年3月20日在任任期7年首任努尔苏丹·纳扎尔巴耶夫设立1990年4月24日(哈薩克蘇維埃社會主義共和國總統) 哈萨克斯坦 哈萨克斯坦政府與…

نادي الهلال السعودي موسم 1977–78موسم 1977–78الرئيس عبد الله بن ناصر بن عبد العزيز آل سعودملعبملعب الأمير فيصل بن فهدالدوري السعودي الممتازالمركز السادس الطقم الداخلي → 1976-77 79-1978 ← موسم نادي الهلال السعودي لكرة القدم 1977–78 يعتبر الموسم العشرين في مسيرة نادي الهلال السعودي منذ ت…

Julang papua Status konservasi Risiko Rendah  (IUCN 3.1) Klasifikasi ilmiah Kerajaan: Animalia Filum: Chordata Kelas: Aves Ordo: Bucerotiformes Famili: Bucerotidae Genus: Rhyticeros Spesies: R. plicatus Nama binomial Rhyticeros plicatus(J.R.Forst., 1781) Diversitas [[#Subspecies|6 Subspesies]] Sinonim Aceros plicatus (Forster, 1781) Julang Papua atau Rangkong Papua (Rhyticeros plicatus) adalah spesies rangkong yang terdapat di kawasan melanesia. Deskripsi Berukuran ini berukuran 76 sam…

Antonov A-40 Krylya Tanka (Rusia: крылья танка, yang berarti sayap tank) adalah upaya Soviet untuk memungkinkan tank untuk meluncur ke medan perang setelah ditarik tinggi-tinggi oleh pesawat terbang, untuk mendukung pasukan udara atau partisan. Sebuah prototipe dibangun dan diuji pada tahun 1942, tetapi tidak dapat diterapkan. Kendaraan ini kadang-kadang disebut A-40T atau KT. Spesifikasi Karakteristik umum Kru: Dua Kapasitas: 1 × T-60 tank Panjang: 12.06 m (39 ft 6 ¾ in) Lebar…

Військово-музичне управління Збройних сил України Тип військове формуванняЗасновано 1992Країна  Україна Емблема управління Військово-музичне управління Збройних сил України — структурний підрозділ Генерального штабу Збройних сил України призначений для плануван…

معركة رأس سبارطيل جزء من الحرب الأهلية الإسبانية  التاريخ 29 سبتمبر 1936  البلد إسبانيا  الموقع رأس سبارطيل[1]  36°14′47″N 4°38′30″W / 36.24638889°N 4.64166667°W / 36.24638889; -4.64166667 [1]  المتحاربون الجمهورية الإسبانية جبهة المتمردين القوة 2 مدمرة 1 طراد ثقيل1 طراد …

Municipality in Michoacán, MexicoSan Lucas MunicipalityMunicipalityLocation of San Lucas in MichoacánCoordinates: 18°34′37″N 100°47′08″W / 18.57694°N 100.78556°W / 18.57694; -100.78556Country MexicoStateMichoacánEstablished1927Municipal seatSan LucasGovernment • Municipal presidentEfraín Serrato DiazArea • Total468.01 km2 (180.70 sq mi)Elevation300 m (1,000 ft)Population (2010) • Total1…

County in Minnesota, United States County in MinnesotaBrown CountyCountyBrown County CourthouseLocation within the U.S. state of MinnesotaMinnesota's location within the U.S.Coordinates: 44°14′N 94°43′W / 44.23°N 94.72°W / 44.23; -94.72Country United StatesState MinnesotaFoundedFebruary 20, 1855 (created)1856 (organized)[1]Named forJoseph Renshaw BrownSeatNew UlmLargest cityNew UlmArea • Total618 sq mi (1,600 km2) …

Luigi Agretti (La Spezia, 16 agosto 1877 – La Spezia, 17 novembre 1937) è stato un pittore e decoratore italiano. È stato artista le cui realizzazioni si valgono di un repertorio formale di tarda matrice neoclassica. Nella sua carriera ha alternato produzioni da cavalletto, affreschi e decorazioni ornamentali. Tutte le sue opere, sia ad olio che a fresco, rivelano un meticoloso studio di particolari, con estrema accuratezza nel disegno e molta originalità, trattando soggetti sia sacri che p…

Ruling party of Albania from 1945 to 1991 Party of Labour of Albania Partia e Punës e ShqipërisëFirst SecretaryEnver Hoxha (1941-1985)Ramiz Alia (1985-1991)Founded8 November 1941 (1941-11-08)Dissolved13 June 1991 (1991-06-13)[1]Succeeded byPSPKShHeadquartersTiranaNewspaperZëri i PopullitYouth wingLabour Youth Union of AlbaniaPioneers of EnverMilitary wingNational Liberation Movement (1942–1945)Membership (1986)147,000IdeologyCommunismMarxism–Len…

Form for imports and exports across borders A customs declaration is a form that lists the details of goods that are being imported or exported when a citizen or visitor enters a customs territory (country's borders).[1] Most countries require travellers to complete a customs declaration form when bringing notified goods (alcoholic drinks, tobacco products, animals, fresh food, plant material, seeds, soils, meats, and animal products) across international borders. Posting items via inter…

Fluorosurfactant and persistent organic pollutant Perfluorooctanesulfonic acid Names Preferred IUPAC name 1,1,2,2,3,3,4,4,5,5,6,6,7,7,8,8,8-Heptadecafluorooctane-1-sulfonic acid Other names PFOS Identifiers CAS Number 1763-23-1 Y 3D model (JSmol) Interactive image ChEBI CHEBI:39421 Y ChemSpider 67068 Y ECHA InfoCard 100.015.618 EC Number 217-179-8 KEGG C18142 Y PubChem CID 74483 UNII 9H2MAI21CL Y CompTox Dashboard (EPA) DTXSID3031864 InChI InChI=1S/C8HF17O3S/c9-1(10,3(13…

Hand-held stone tool used with a metate or quern to process or grind food by hand Native American manos from Arizona. A mano (Spanish for hand) is a ground stone tool used with a metate to process or grind food by hand.[1] It is also known as metlapil, a term derived from Nahuatl.[2] History Manos were used in prehistoric times to process wild seeds, nuts, and other food, generally used with greater frequency in the Archaic period, when people became more reliant upon local wild …

Sand- to boulder-sized particle of debris in the Solar System Meteor redirects here. For other uses, see Meteor (disambiguation). A meteoroid shown entering the atmosphere, causing a visible meteor and hitting the Earth's surface, becoming a meteorite A meteoroid (/ˈmiːtiərɔɪd/ MEE-tee-ə-royd)[1] is a small rocky or metallic body in outer space. Meteoroids are distinguished as objects significantly smaller than asteroids, ranging in size from grains to objects up to a meter wide.&#…

الحركة الموالية لروسيا في أوكرانيا 2014 جزء من الثورة الأوكرانية 2014 معلومات عامة التاريخ 23 فبراير 2014 (2014-02-23)- الان البلد أوكرانيا  تسببت في الحرب الروسية الأوكرانية  الموقع القرم (شبه جزيرة) المتحاربون خدمة أمن أوكرانياوزارة الشؤون الداخليةالقوات المسلحة الأوكر…

Norbert Dragonneau Personnage de fiction apparaissant dansLes Animaux fantastiques. Cosplay de Norbert Dragonneau. Nom original Newton Artemis Fido Scamander Naissance 24 février 1897[1] Origine Britannique Sexe Masculin Activité « Magizoologiste » (spécialiste des créatures magiques), employé au ministère de la Magie et écrivain. Caractéristique Empathique, sensible et indépendant. Famille Frère de Thésée Dragonneau et grand-père (par alliance) de Luna Lovegood[2]. Affi…

Parliamentary election in Kyrgyzstan 2020 Kyrgyz parliamentary election ← 2015 4 October 2020 2021 → All 120 seats in the Supreme Council61 seats needed for a majorityTurnout56.50% Party Leader % Seats +/– Birimdik Marat Amankulov 24.90 46 New Mekenim Kyrgyzstan Mirlan Bakirov 24.27 45 New Kyrgyzstan Kanatbek Isaev 8.90 16 −2 Butun Kyrgyzstan Adakhan Madumarov 7.25 13 +13 This lists parties that won seats. See the complete results below.Results by region Prime Mini…

Softball stadium in South Carolina, U.S.A. McWhorter StadiumFormer namesClemson Softball Stadium (2020)LocationN. Silas Pearman Blvd.(Perimeter Rd.)Clemson, South CarolinaCoordinates34°40′39″N 82°50′57″W / 34.677568°N 82.849033°W / 34.677568; -82.849033OwnerClemson UniversityOperatorClemson UniversityCapacity1,000SurfaceNatural grassConstructionOpened2020; 4 years ago (2020)Construction cost$13 million[1]TenantsClemson Tigers (2020-pr…

Irish statesman (1882–1975) De Valera redirects here. For other people with the surname, see De Valera (surname). Éamon de ValeraDe Valera, c. 1918–19213rd President of IrelandIn office25 June 1959 – 24 June 1973Taoiseach Seán Lemass Jack Lynch Liam Cosgrave Preceded bySeán T. O'KellySucceeded byErskine H. Childers2nd TaoiseachIn office20 March 1957 – 23 June 1959PresidentSeán T. O'KellyTánaisteSeán LemassPreceded byJohn A. CostelloSucceeded bySeán …