From: mooney@dogbert.cc.ndsu.NoDak.edu (Tim Mooney)
Subject: Re: DU V4.0E Freeware CD-ROM?
Date: 1999/11/04 [thread overview]
Message-ID: <7vsq53$vk3$1@news.ndsu.nodak.edu> (raw)
In-Reply-To: sjkzowwd33t.fsf@bismuth.zk3.dec.com
In article <sjkzowwd33t.fsf@bismuth.zk3.dec.com>,
Mark Gelinas <gelinas@bismuth.zk3.dec.com> wrote:
> "Bruce W. Mohler" <bruce.w.mohler@saic.com> 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 <stdio.h>
#include <stdlib.h>
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
next prev parent reply other threads:[~1999-11-04 5:00 UTC|newest]
Thread overview: 15+ messages / expand[flat|nested] mbox.gz Atom feed top
1999-10-28 4:00 DU V4.0E Freeware CD-ROM? Jerry Hudgins
1999-10-29 4:00 ` Massimo Gais
1999-10-29 4:00 ` Jerry Hudgins
1999-10-29 4:00 ` Bruce W. Mohler
1999-10-29 4:00 ` Bruce W. Mohler
[not found] ` <7FFBA0BED0033EEB.441D9DB91AB3E4A1.1EF7A08F5528919F@lp.airnews.net>
1999-11-01 5:00 ` Bruce W. Mohler
1999-11-01 5:00 ` Andrew Hobson
1999-11-01 5:00 ` SVD
1999-11-02 5:00 ` Mark Gelinas
1999-11-04 5:00 ` Tim Mooney [this message]
1999-11-03 5:00 ` lar3ry gensch
1999-11-01 5:00 ` Jeff Donsbach
1999-11-02 5:00 ` Bruce W. Mohler
1999-11-03 5:00 ` T.E.Dickey
1999-11-05 5:00 ` Keith Moodie
read-only archive
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox