From mboxrd@z Thu Jan 1 00:00:00 1970 Received: (qmail 12724 invoked from network); 3 May 1998 03:49:36 -0000 Received: from unknown (HELO axe.intercall.com) (root@208.5.199.1) by mail2.redhat.com with SMTP; 3 May 1998 03:49:36 -0000 Received: from sherlock.intercall.com (ts7-66.intercall.com [207.77.26.66]) by axe.intercall.com (8.8.7/8.6.9) with ESMTP id XAA17636 for ; Sat, 2 May 1998 23:49:30 -0400 (EDT) Message-ID: X-Mailer: XFMail 1.3-alpha-031298 [p0] on Linux X-Priority: 3 (Normal) Content-Type: text/plain; charset=us-ascii Content-Transfer-Encoding: 7bit MIME-Version: 1.0 In-Reply-To: <199805030337.VAA18785@ellpspace.math.ualberta.ca> Date: Sat, 02 May 1998 23:49:44 -0400 (EDT) Reply-To: beww@intac.com Organization: Unix Dilletante Sender: beww@sherlock.intercall.com From: "Brian E.W. Wood" To: axp-list@redhat.com Subject: Re: Programming on an Alpha (Redhat of course...) On 03-May-98 Michal Jaegermann wrote: >> >> I have noticed as I try to compile programs on my Alpha that they >> regularly get errors but on my Intel box they don't. > > Most likely these get errors because they have bugs. Faulty assumptions > that int can hold a pointer, for example, are masked on Intel due > to relative sizes of these types on Intel but they bite on Alpha. > As C defaults undeclared (or arguments to functions without prototypes) > this sometimes may be hard to spot. Misaligned stack due to > carelessnes with types is also not unheard of. > >> Could someone point me >> toward some resources about programming on the Alpha. > > K&R, second edition, is recommended - and pay attention to what authors > have to say. Using -Wall with gcc, and even stricter available checks, > also helps a lot. I tried to reply to the original author of this thread but the message bounced with user unknown. The comments above are quite valid, but I noticed that the original message referred to C++ code, which is pretty broken on RH 5.0/Alpha with gcc/g++. I'd suggest checking out egcs (latest version 1.0.2), which seems to do a lot better with c++ code. There are egcs RPMs at ftp://ftp.redhat.com/pub/contrib/hurricane Compiling yourself from source is of course better, the compiler bootstraps and compiles itself. egcs compiled all of KDE beta4 for me, which is a pretty good c++ workout. Just my $0.02. --- Brian E.W. Wood beww@intac.com