How ANSI is Apollo's cc 6.7 (SR 10.2)

Cameron Simpson,Uhmmm..???? Who knows cameron at usage.csd.oz
Tue Sep 11 20:16:56 AEST 1990


[followups directed to comp.sys.apollo]

>From article <15434 at reed.UUCP>, by minar at reed.bitnet (Nelson Minar,L08,x640,7776519):
| I've run into the following constructs in Apollo's standard include files.
| The documentation (and the tech rep) both claimed that Apollo's C compiler is
| ANSI C. This is born out by the compiler defining __STDC__.

The tech rep is wrong. I think the documentation says evasive things like
"many ANSI extensions" and so forth. You'll discover that their definition
of __STDC__ is also evasive - they define it to 0.

| I wouldn't care about the compiler as I have gcc running on the machine.
| However, I have to use the header files that came with the machine, and here
| is where I have a problem.  [...]
|         unsigned char   *_ptr #attribute[aligned(1)];

Others have remarked about the #attribute. At least their lint passes it.
Line 37 of our Apollo BSD setjmp.h has
	extern int sigsetjmp() #options(abnormal);
Apollo's lint says:
	/usr/include/setjmp.h(37): illegal character: 37777777777 (octal)
	/usr/include/setjmp.h(37): cannot recover from earlier errors: goodbye!
Ugly, no? I use lint a lot. I feel bad having
	#ifdef apollo
	# ifndef lint
	#  include <setjmp.h>
	# endif
	#else
	# include <setjmp.h>
	#endif
in my global include file. Fortunately I don't use setjmp() much.

On the subject of the semiANSIness of the Apollo cc, peering at my
a configuration file I have here the following weirdness applied under 10.1.
I think most of them still apply under 10.2 (we run it but I haven't checked).
	- "const" doesn't work.
	- the ANSI #include files aren't there (limits.h and so forth).
	- self-referential macros fail, viz
		#define	it(x)	(fputs("hi\n",stderr),it(x))
	- stdio isn't ANSI. Supposedly fflush(NULL) will flush all streams.
	  Not on Apollos.

Rumour hath it that 10.3 has an ANSI compiler. That would be nice.
A better lint would be nice, too.
	- Cameron Simpson
	  cameron at spectrum.cs.unsw.oz.au



More information about the Comp.std.c mailing list