Strategic BSD Funding
BSD Fund Logo BSD Beastie

Portable C Compiler Fund

BSD Fund has partnered with software engineer and researcher Anders Magnusson to bring the Portable C Compiler "pcc" to 1.0 release status. Originally written by Stephen C. Johnson of Bell Labs in the 1970's, pcc is today valued by developers for its speed, simplicity, BSD license and of course, portability. Mr. Magnusson has worked with pcc since 2002 and been project maintainer since 2007.

We did it! pcc 1.0 Has Been Released

In the words of Anders Magnusson, "pcc should be a well-working compiler on i386 and amd64 on a number of OSes, including the BSD's, most Linuxes and also Microsoft Windows."

pcc 1.0 Work Description

Strike-through entries are complete

Improved Static Single Assignment Form Conversion Functionality

Convert the expression trees in a function to SSA form and back.
SSA form conversions require:

  • Creating the Control-Flow Graph (CFG)
  • Building a dominator tree
  • Calculating the dominance frontiers
  • Inserting phi functions
  • Renumbering temporary variables

Improved C99 Functionality

  • Improved complex numbers: Support the _Complex and _Imaginary data types introduced in C99.
  • Improved dynamic arrays in function headers/prototypes: Support exists for automatic dynamic arrays but not yet fixed for function headers/prototypes.
  • Improved abstract dynamic declarations: Support the ability to use abstract declarators everywhere allowed.

Improved GCC Compatibility

  • attribute(): Support parsing of the attribute() syntax and test for commonly used extensions.
  • typeof(): Support the typeof() keyword.
  • Case number ranges: Support giving number ranges to case statements.
  • Incomplete Enums: Support forward declaration of enums.
  • Unnamed struct/union fields: Support the use of unnamed members compatible with both GCC and the historical use of it.

AMD64 Port

Port the Portable C Compiler to the AMD64 architecture.

  • Implement code generation
  • Implement FPU code generation
  • Implement fPIC code generation

Budget

Total donations needed to complete the 1.0 work: $12,000
Donations received to date: $12,492

More information about the pcc project can be found at the pcc home page.

Copyright © 2008 – 2023 Michael Dexter. All rights reserved.
BSD Daemon used with permission.