

Portable C Compiler 1.0 released - cannedprimates
http://undeadly.org/cgi?action=article&sid=20110403095326

======
mansr
I tried this and immediately hit three internal compiler errors and one
rejection of perfectly valid code. As far as I am concerned, this is not a
compiler.

~~~
tshtf
Did you file a bug report?

<http://pcc.ludd.ltu.se/bugs/>

~~~
mansr
I haven't had time to distill the ICEs into proper bug reports anyone would
want to touch. The last failure was easy to reduce, and I added a note to an
already open entry for what seemed to be another instance of the same bug.

------
cpeterso
How does PCC compare to the Plan 9 C compiler? The Plan 9 C compiler is BSD
licensed; has a straightforward implementation; emits code for x86, x86-64,
and ARM; and is a core component of Google's Go toolchain.

------
baltcode
Someone needs to port this to OSX. This could enable a non-admin install of
MacPorts on computers without XCode, which is impossible so far.

~~~
Hoff
There can be good reasons why an IT organization has not installed development
tools.

MacPorts is the deep end of the (support) pool for somebody that can't (also)
install Xcode.

MacPorts is a good way for a non-admin or inexperienced user to get themselves
seriously tangled with PATH, or with unexpected tool skews and the odd-ball
errors. (And this is ignoring how much replication arises within what's
installed by Apple and with what's also installed by MacPorts, bypassing
what's installed by Apple.)

But if you really want to try a C compiler download for Mac OS X (or other
boxes) that doesn't involve downloading and installing Xcode, have a look
here:

<http://llvm.org/releases/download.html>

~~~
lyso
Another problem with XCode is not that it is difficult for a user to install,
but that XCode 4 is not free (as in beer), and some MacPorts/Homebrew users
object to that.

~~~
X-Istence
Xcode 3.x is still available for free from Apple and will work with MacPorts
and Homebrew without issues.

------
danieldk
Could someone elaborate why one would use pcc over the also liberally licensed
clang/LLVM, except for ancient architectures on which LLVM doesn't run or is
too slow?

~~~
rwmj
The original motivation (from back in 2007) was threefold:

(1) BSD licensed, which was felt to be preferable to GCC (ie. GPL) for BSD
developers.

(2) It's supposed to compile things 5-10 times faster than GCC.

(3) Very portable to new architectures; obviously a good thing for NetBSD
which is ported to just about everything.

LLVM doesn't figure into this; perhaps it was unknown or not very capable back
in 2007?

Source: [http://marc.info/?l=netbsd-tech-
toolchain&m=118961767521...](http://marc.info/?l=netbsd-tech-
toolchain&m=118961767521349&w=2)

~~~
nickbp
With regard to 2, I don't care so much about compile speed (within reason) as
I do about the speed of the produced binary. How fast is the output?

~~~
tedunangst
Depends entirely on what particular optimizations apply to your code. Overall,
pcc is probably within 10% for most code, but you'll also find examples where
gcc or llvm is 10x faster. It all depends.

