[net.micro.cbm] how good are the C compilers for the 64?

joemu@nsc-pdc.UUCP (Joe Mueller) (07/10/85)

I am wondering how good a job the various implementors have done in bringing
up C on the 64. All the advertisements say they are "Kernighan and Ritchie"
minus maybe bitfields. Could someone tell me the following:

1. Is the preprocessor a full implementation with:
	a. macros with parameters
	b. include capabilities
	c. handles expressions like FOO && BAR || BAZ in #if statements

2. Can their parsers handle complex declarations and their expression
   handlers use complex data types? For example try:
	int (*(*(*foo)[5])())[7]
   Which declares foo as pointer to array of 5 pointers to functions returning
   a pointer to an array of 7 int (whew!!)

3. Do they have simple things like:
	a. structures
	b. unions
	c. bitfields (I know at least one doesn't)
	e. typedefs (and if so, do they scope properly; pcc doesn't even do
	   that)
	f. multi-dimentional arrays
	g. floats and doubles
	h. unsigned types
	i. register, static, and extern data types

4. Can you link with assembly language? Are there any limitations? Can you
   create and use librarys? Can you replace a library function with one of
   your own?

5. Do they handle initializers for simple and complex types like structs?

6. Anything else that may be missing that you noticed.

dwl10@amdahl.UUCP (Dave Lowrey) (07/11/85)

> I am wondering how good a job the various implementors have done in bringing
> up C on the 64. All the advertisements say they are "Kernighan and Ritchie"
> minus maybe bitfields. Could someone tell me the following:

Here are the answers for PROLINE SOFTWARE's C-POWER


> 
> 1. Is the preprocessor a full implementation with:
>       a. macros with parameters
> 	b. include capabilities
> 	c. handles expressions like FOO && BAR || BAZ in #if statements

Answers: a. Yes
         b. Yes, includse file must be on the source disk
         c. Yes
> 
> 2. Can their parsers handle complex declarations and their expression
>    handlers use complex data types? For example try:
> 	int (*(*(*foo)[5])())[7]
>    Which declares foo as pointer to array of 5 pointers to functions returning
>    a pointer to an array of 7 int (whew!!)

Answer: Yes
> 
> 3. Do they have simple things like:
> 	a. structures
> 	b. unions
> 	c. bitfields (I know at least one doesn't)
> 	e. typedefs (and if so, do they scope properly; pcc doesn't even do
> 	   that)
> 	f. multi-dimentional arrays
> 	g. floats and doubles
> 	h. unsigned types
> 	i. register, static, and extern data types
Answers: a. Yes
         b. Yes
         c. No, but can be simulated with ands and ors
         e. Yes, I need an example of something that doesn't "scope
            properly".
         f. Yes
         g. Floats yes, double no.
         h. Yes
         i. Register variables are put in page zero. Static and
            extern types are supported.
> 
> 4. Can you link with assembly language? Are there any limitations? Can you
>    create and use librarys? Can you replace a library function with one of
>    your own?
> 
Answers: There is a "sys" function that calls a routine at a given
         address. Parameters can be passed. Several people are working
         on an assembler that produces "C-POWER" object files, but
         at this point, you canl link in an assembler routine.
         You can create your own libraries, and you can replace
         existing functions.

> 5. Do they handle initializers for simple and complex types like structs?
> 
Answer: Yes

> 6. Anything else that may be missing that you noticed.

C-POWER comes with a "shell" that makes your 64 look alot like UNIX.
There are many built in utility commands. It supports re-direction ofre
stdin and stdout. There is no stderr. It also supports 2 disk drives.

The linker will produce "bin" files that are run under the shell
or standalone under basic (i.e. the first (and only) basic line
is SYS XXXX).

All in all, I am very happy with C-POWER
-- 
-------------------------------------------------------------------
                               Dave Lowrey

"To vacillate or not to vacillate, that is the question....
 ....or is it?"
                                ...!(<sun,cbosgd,ihnp4}!amdahl!dwl10

[ The opinions expressed <may> be those of the author and not necessarily
  those of his most eminent employer. ]