[prev in list] [next in list] [prev in thread] [next in thread]
List: pcc-list
Subject: c++ (was Re: zero-length arrays)
From: Thorsten Glaser <tg () mirbsd ! de>
Date: 2008-10-28 20:53:37
Message-ID: Pine.BSM.4.64L.0810282047280.21703 () herc ! mirbsd ! org
[Download RAW message or body]
Gregory McGarry dixit:
> I'm just waiting for a C++ front-end. :)
You can use the C backend of LLVM together with the llvm-g++ front-end
to convert the offending code to pure C.
In fact, pcc becomes better and better, and converting a "known good"
snapshot of LLVM and llvm-gcc into C for bootstrapping would enable
us to switch from gcc/g++/gnat to pcc/llvm-g++ as system compilers.
(And later, to clang.)
Similarily, you could use llvm's C backend to convert another C++
compiler written in C++ to C, or just build g++ using a gcc boot-
strapped with pcc.
text data bss dec hex filename
186956 1032 20032 208020 32c94 pcc-cur-n/mksh
173894 1040 20288 195222 2fa96 gcc-cur-n/mksh
160569 936 7424 168929 293e1 pcc-cur-s/mksh
153167 952 7616 161735 277c7 gcc-cur-s/mksh
In fact, I think it's funny that .data and .bss are much larger with
gcc than with pcc. And that's gcc -Os vs pcc -O2. Still, code size
is a concern for boot floppies etc.
//mirabilos
--
Sometimes they [people] care too much: pretty printers [and syntax highligh-
ting, d.A.] mechanically produce pretty output that accentuates irrelevant
detail in the program, which is as sensible as putting all the prepositions
in English text in bold font. -- Rob Pike in "Notes on Programming in C"
[prev in list] [next in list] [prev in thread] [next in thread]
Configure |
About |
News |
Add a list |
Sponsored by KoreLogic