Xref: utzoo comp.std.c:3581 comp.sys.apollo:6407 Path: utzoo!utgpu!news-server.csri.toronto.edu!cs.utexas.edu!samsung!munnari.oz.au!metro!usage.csd.unsw.oz.au!spectrum!cameron From: cameron@usage.csd.oz (Cameron Simpson,Uhmmm..???? Who knows) Newsgroups: comp.std.c,comp.sys.apollo Subject: Re: How ANSI is Apollo's cc 6.7 (SR 10.2) Message-ID: <847@usage.csd.unsw.oz.au> Date: 11 Sep 90 10:16:56 GMT References: <15434@reed.UUCP> Sender: news@usage.csd.unsw.oz.au Reply-To: cameron@spectrum.cs.unsw.oz.au (Cameron Simpson) Followup-To: comp.sys.apollo Organization: none Lines: 46 [followups directed to comp.sys.apollo] From article <15434@reed.UUCP>, by minar@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 # endif #else # include #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@spectrum.cs.unsw.oz.au