ANSI C

BURNS gt0178a at prism.gatech.EDU
Wed Sep 19 17:46:24 AEST 1990


in article <2465 at sud509.ed.ray.com>, heiser at tdw201.ed.ray.com says:
> Anyone here know anything about the ANSI compatibility of Sequents vs
> Harris and/or GCC?  (It MUST be Ansi compatible, since they told us to
> write ANSI code ... hmmm...)

I use Dynix here. (I can never keep Symmetry vs. Balance straight - ours
is the one w/ the 10 parallel 386's.) Anyway, one of our our UA's told me
that Dynix C is horribly non-Ansi. Defining function parameter types
inbetween the ()'s instead of inbetween the ) and {, let alone function
prototypes is a no-no. You'll also run into trouble w/ code sequences like:

main(argc,argv)
int argc;            /* notice where the parm's need to be defined
char ** argv;
{
char tststr[]="This is a test";

Either tststr needs to be defined at 'file scope' - outside of the scope
of a function or main - or needs to be given the static attribute, or else
you'll get an "aggregate initialization error".
-- 
BURNS,JIM
Georgia Institute of Technology, Box 30178, Atlanta Georgia, 30332
uucp:	  ...!{decvax,hplabs,ncar,purdue,rutgers}!gatech!prism!gt0178a
Internet: gt0178a at prism.gatech.edu



More information about the Comp.unix.programmer mailing list