From mboxrd@z Thu Jan 1 00:00:00 1970 X-Google-Language: ENGLISH,ASCII-7-bit X-Google-Thread: fee84,ff4c91ba714126d1 X-Google-Attributes: gidfee84,public From: mooney@dogbert.cc.ndsu.NoDak.edu (Tim Mooney) Subject: Re: DU V4.0E Freeware CD-ROM? Date: 1999/11/04 Message-ID: <7vsq53$vk3$1@news.ndsu.nodak.edu>#1/1 X-Deja-AN: 544528983 Content-Transfer-Encoding: 7bit References: <381925B2.4B509182@e-farm.com> <7FFBA0BED0033EEB.441D9DB91AB3E4A1.1EF7A08F5528919F@lp.airnews.net> <381DF2AA.D0E17539@saic.com> Content-Type: text/plain; charset=US-ASCII X-Complaints-To: abuse@nodak.edu X-Trace: news.ndsu.nodak.edu 941747171 32387 134.129.106.23 (4 Nov 1999 20:26:11 GMT) Organization: North Dakota Higher Education Computing Network (NDHECN) Mime-Version: 1.0 NNTP-Posting-Date: 4 Nov 1999 20:26:11 GMT Newsgroups: comp.unix.osf.osf1 In article , Mark Gelinas wrote: > "Bruce W. Mohler" writes: > > Then again, gcc is more "portable" in that I have the same version > > (2.7.2.2) on all my UNIX boxes so I can compile the same code > > everywhere. > > > I've never had problems compiling with DEC C. A few compiler flags > may need changing, but I've never seen an application fail to compile > under DEC C that did work with gcc. That's a bit optimistic, unfortunately. I far prefer to use DEC C vs gcc on Tru64 Unix, but sometimes I just can't because the software in question takes advantage of gcc-isms or uses features that gcc/egcs will pass but that other compilers (DEC C and compilers from other vendors) will (correctly, in most cases) flag as an error. Case in point: ORBit, the GNOME CORBA component. If you can get that to build using DEC C on a recent version of Tru64 Unix without modifying the source code, I'm all ears. In fact, if you can get it to build with DEC C even with substantive modifications to the source code, I'm still listening. It *will* build if you use gcc. You can get ORBit and its prerequisites (glib and possibly libxml) from ftp://ftp.gnome.org/pub/GNOME/sources Another example: 01:48pm dogbert /tmp$cat foo.c #include #include int main(int argc, char *argv[]) { int foo=1; switch (foo) { case 0 : printf("I doubt it\n"); break; case 1 : printf("Hi there\n"); break; default: } exit(0); } 01:48pm dogbert /tmp$gcc -Wall foo.c -o foo 01:49pm dogbert /tmp$./foo Hi there 01:49pm dogbert /tmp$cc -portable -std foo.c -o foo cc: Error: foo.c, line 20: Invalid statement. (badstmt) } --------^ What `cc' is objecting to is the default: label with no statement after it. Based on how I read the C specs, cc is right. The fact is that there are quite a few packages out there (many of them GNOME related) that use this (a default: label with no code after it). Most of the package authors are really good about accepting patches for stuff like this, but that's not always the case. Anyway, I'm not trying to get down on Compaq's compiler or the compiler group. I think DEC C is an *excellent* compiler, and I've had really good luck with getting problems I've reported (even right here in this newsgroup) looked into and even fixed (kudos to Jeff Sullivan for investigating several compiler problems I've reported in the past). Jeff and others regularily "patrol" this group and other spots looking for reported problems regarding the compilers and other peices of the OS and ways to improve your products, and that's to be commeneded. I just think your optimism may be a bit overzealous in this case. ;-) Tim -- Tim Mooney mooney@dogbert.cc.ndsu.NoDak.edu Information Technology Services (701) 231-1076 (Voice) Room 242-J1, IACC Building (701) 231-8541 (Fax) North Dakota State University, Fargo, ND 58105-5164