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

Nelson Minar,L08,x640,7776519 minar at reed.bitnet
Mon Sep 10 11:51:45 AEST 1990


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__.

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.  Since I don't have a copy of the ANSI draft here,
could some kind soul tell me if these constructs are legal ANSI?

(from stdio.h)
extern  struct  _iobuf {
        unsigned char   *_ptr #attribute[aligned(1)];
	[ some removed ]
        unsigned char   *_base #attribute[aligned(1)];
	[ . . . ]
} _iob[];

Just what is '#attribute' supposed to mean? I assume it is supposed to be
picked up by the preprocessor, but isn't that what #pragma is for?


(from string.h - this is wrapped inside of an '#ifdef __STDC__')
extern char *strcpyn(...);

My reading of K&R2 is that all variable argument functions must have at least
one named argument, but I am not very clever with such things. Is this legal?


Assuming these 2 things are illegal, are there any other non-ANSIisms people
out there in Apollo world have had to deal with?



More information about the Comp.std.c mailing list