Gabriel Sechan wrote:
----------------------------------------
Date: Mon, 24 Mar 2008 16:05:45 -0700
From: [EMAIL PROTECTED]
To: [email protected]
Subject: Re: Compiling C++ to C

Gabriel Sechan wrote:
I have to port a C++ program to a new platform, using a specific version of a 
compiler (I guess technically I only have to be ABI compatible with said 
compiler).  Said compiler is for an embedded platform, and cannot be updated to 
a modern version because our partner has no plans to migrate.  Needless to say, 
troubles arose.  This ancient version does not support templates.  We use 
templates.  Removing the templates would be painful-  very painful.  So we're 
considering cross-compiling to C.  Has anyone done this?  Any pointers?  Anyone 
with any knowledge of the Comeau compiler?

Gabe
What about cfront?

Looking at wikipedia, cfront seems to be abandoned (as of a failed version 4.0). I can't find anyone actively offering it for sale or support. This is a work project, not home, so I'm not looking to cheap out. I might try downloading an old version, but I'd rather pay for something that's active than screw around with abandoned code for weeks.
You seriously can't use a modern gcc cross compiler to achieve ABI compatibility?

Well, the Comeau compiler is actually a front end compiler that uses an "ordinary" compiler as its backend. It's quite cheap and it has the advantage of being more C++ standards compliant than anything else out there, which is nice. It also has a mode where it will instantiate template entities. So, perhaps that will suite your needs:

http://www.comeaucomputing.com/

--Chris

--
[email protected]
http://www.kernel-panic.org/cgi-bin/mailman/listinfo/kplug-lpsg

Reply via email to