Article View: comp.unix.programmer
Article #875Re: ANSI C
From: BURNS
Date: Wed, 19 Sep 1990 07:46
Date: Wed, 19 Sep 1990 07:46
25 lines
1550 bytes
1550 bytes
in article <2465@sud509.ed.ray.com>, heiser@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@prism.gatech.edu
Technical Details
Message-ID:
<13839@hydra.gatech.EDU>Path:
arc1-ca.pugleaf.net!utzoo!utgpu!news-server.csri.toronto.edu!rutgers!mephisto!prism!gt0178aReferences:
<2465@sud509.ed.ray.com>Show Full Headers
Complete Article Headers
Path: arc1-ca.pugleaf.net!utzoo!utgpu!news-server.csri.toronto.edu!rutgers!mephisto!prism!gt0178a From: gt0178a@prism.gatech.EDU (BURNS) Newsgroups: comp.unix.programmer,gnu.gcc Subject: Re: ANSI C Message-ID: <13839@hydra.gatech.EDU> Date: 19 Sep 90 07:46:24 GMT References: <2465@sud509.ed.ray.com> Followup-To: comp.unix.programmer Distribution: usa Organization: Georgia Institute of Technology Lines: 25