Path: utzoo!utgpu!watserv1!watmath!att!tut.cis.ohio-state.edu!zaphod.mps.ohio-state.edu!usc!apple!bionet!ames!dftsrv!jagmac2.gsfc.nasa.gov!jim From: jim@jagmac2.gsfc.nasa.gov (Jim Jagielski) Newsgroups: comp.unix.aux Subject: Re: C compilers for A/UX Message-ID: <3380@dftsrv.gsfc.nasa.gov> Date: 11 Sep 90 12:12:52 GMT References: <3361@dftsrv.gsfc.nasa.gov> <3362@dftsrv.gsfc.nasa.gov> <1990Sep10.002711.22219@servalan.uucp> Sender: news@dftsrv.gsfc.nasa.gov Reply-To: jim@jagmac2.gsfc.nasa.gov (Jim Jagielski) Organization: NASA Goddard Space Flight Center Lines: 38 In article <1990Sep10.002711.22219@servalan.uucp> rmtodd@servalan.uucp (Richard Todd) writes: >jim@jagmac2.gsfc.nasa.gov (Jim Jagielski) writes: > >>I have the Unisoft Optimizing C Compiler for A/UX (GreenHills), A/UX cc >>and GnuC 1.37.91. Without a doubt, the Unisoft compiler makes tight, fast >>code. cc isn't very fast or tight, but very stable. And it supports shared >>libraries (Unisoft doesn't... see below). But I've had NOTHING but bad luck >>using GnuC (gcc)!! Weird behavior, core dumps, crashes, bombs, etc... > >A/UX cc stable??? By stable, I mean that it produces solid code. Maybe stable was the wrong term, but I stand behind my opinion. > I trust you *do* know about compiling with >-fwritable-strings? GCC by default puts string constants in text space where >they can't be modified, as ANSI C allows. Alas, broken implementations of >sscanf, like Apple's, try to write to the string they're scanning, which means >that if you're passing a constant string to sscanf, it dies with SIGSEGV unless >you compiled with -fwritable-strings. Maybe that was it... I was compiling with -traditional. This happened with my port of ftpd, sendmail and fingerd, which all use sscanf (amongst others) so that may be the problems. Seems to me, the default should be -fwri* since, as I understand it, this is basically an ANSI "feature", and should be added when one selects -ansi... Thanks for the help, but maybe my attitude towards gcc may be a little tainted by FSF and their "holier than thou" attitude. -- ======================================================================= #include =:^) Jim Jagielski NASA/GSFC, Code 711.1 jim@jagmac2.gsfc.nasa.gov Greenbelt, MD 20771 "Kilimanjaro is a pretty tricky climb. Most of it's up, until you reach the very, very top, and then it tends to slope away rather sharply."