[comp.lang.c++] C++ on a MIPS/800

tjt@lll-tis.arpa (Tim Tessin) (08/27/87)

Has anyone ported 1.2 to a MIPS?  I am trying to bring it up and it seems
to work (sort of).  I keep getting nasty messges from cfront about
complex expressions in a ostream construct. To wit: 
	cerr << "blah blah" << sizeof (struct hdr) << "blah blah\n";
cfront tells me (paraphrase): 
	"nasty Internal error at line xxx, blah blah, core dump"
replacing the sizeof expression with a simple variable allows cfront
to continue.  (The (bool?expr:expr) construct also screws up likewise.)

Problems I found in MIPS environment to watch for:  The mips compiler
doesn't define the appropriate flags for machine dependent stuff in the
cpp ( #define unix, #define mips, etc.).  They do it in the cc program.
Of course, all include files dependent on the mips architecture fail
using a simple CC script. I used cc -E instead of cpp in the CC script and
improved things alot!  Don't use .C extensions for C++ files.  The compiler
only defines the flag "LANGUAGE_C" when the extension is .c.  "LANGUAGE_C"
is used in "signal.h" no less, and it fails to provide signal definitions if 
you simply compile a .C file including "signal.h".  
Size of various word/float boundaries is almost the same as the vax, 
I don't think this is where the problems are.

I have some other flakey problems with c++ applications programs 
(like segmentation violations) but I don't have enough info yet to 
determine whether cfront is at fault.  

Tim Tessin - Lawrence Livermore National Laboratory 
Phone: (415) 423-4560 / 422-8971
ARPA:  tjt@lll-tis-b.ARPA
UUCP:  {ihnp4,dual,sun}!lll-lcc!lll-tis!tjt