Newsgroups: comp.sys.transputer
From: canderson@novatel.ca (Curtis Anderson)
Subject: Comeau C++ with LSC tools experience
Summary: C++ working on transputer
Organization: NovAtel Communications Ltd.
Date: 26 Sep 1994 21:19:38 GMT
Message-ID: <367dta$cdt@fw.novatel.ca>

I have recently been successfull in getting a C++ to C translator (Comeau
Computing V3.0) to work with the Logical Systems C compiler (V91.1).

Some of the problems I had included:

- Getting it to work with Borland Make.  We were using the V3.6 make and
  that seemed to be incompatible with Comeau.  V3.7 seems to work fine.

- Getting used to ignoring warning messages from tcx (turn on -w0)

- In one of my constructors I call a bunch of other constructors:
	Menusys::Menusys( lots of stuff) :
	       menu1(stuff), etc.  menuN(stuff)

	The C code that bcomeau generates is something like:

	((((((((((((((((( 
	menu1(stuff), etc.  menuN(stuff) );

	rather than simply calls to menu1 - menuN constructors 1 right after
	the other.  All these extra '(' seem too upset tcx.  I got around that
	by increasing the compilers stack size from 32K to 64K but I may still
	have overflows in the future.  Good thing we have source to LSC.
	I will probably need to write a filter to flatten this someday
	(unless Kirk or Greg volunteer to do it).

- Getting the LSC preprocessor to handle CPP style comments.  (Comeau
  doesn't supply a preprocessor).  Kirk at LSC fixed this for me.

- fixing our include files to be compatible with Comeau C++ (no forward
  references, no C++ key words, etc.)

- writting our own new, delete, vec_new, vec_delete, etc.  This turned
  out to be fairly easy.

Thanks to both Greg at Comeau Computing (comeau@csanta.attmail.com)
and Kirk at LSC (bailey@oneworld.com).  They were very helpfull in getting
me up and running.

Curtis Anderson
NovAtel Communications Ltd.
Global Positioning SystemS

