From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (qmail 10930 invoked by alias); 6 Sep 2005 15:23:16 -0000 Mailing-List: contact gcc-help-help@gcc.gnu.org; run by ezmlm Precedence: bulk List-Archive: List-Post: List-Help: Sender: gcc-help-owner@gcc.gnu.org Received: (qmail 10908 invoked by uid 22791); 6 Sep 2005 15:23:10 -0000 Received: from joseki.proulx.com (HELO joseki.proulx.com) (216.17.153.58) by sourceware.org (qpsmtpd/0.30-dev) with ESMTP; Tue, 06 Sep 2005 15:23:10 +0000 Received: from dementia.proulx.com (dementia.proulx.com [192.168.1.115]) by joseki.proulx.com (Postfix) with ESMTP id 065CE4B2E8 for ; Tue, 6 Sep 2005 09:23:07 -0600 (MDT) Received: by dementia.proulx.com (Postfix, from userid 1000) id D1BA315415D; Tue, 6 Sep 2005 09:23:07 -0600 (MDT) Date: Tue, 06 Sep 2005 15:23:00 -0000 To: gcc-help@gcc.gnu.org Subject: Re: Minimum GCC version to safely compile 64-bit binaries for AMD64? Message-ID: <20050906152307.GB9922@dementia.proulx.com> References: <4315EE33.3090900@eso.org> <20050904001929.GA30341@dementia.proulx.com> <431DA325.1070307@eso.org> Mime-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: <431DA325.1070307@eso.org> User-Agent: Mutt/1.5.9i From: bob@proulx.com (Bob Proulx) X-SW-Source: 2005-09/txt/msg00034.txt.bz2 Neil Ferguson wrote: > Bob Proulx wrote: > >If this is your first push into 64-bit space then the biggest problems > >will be type safety in your code. > > It is our first push into 64-bit, and yes, you're right :) As a living I spend a lot of time supporting and porting legacy code. I am really hoping you have a good set of tests to use. Because it is very painful to work with old code without any tests. :-{ I suggest that you use at least these options to compile your programs. Then fix all of the warnings that are produced. gcc -Wall -Wmissing-prototypes -Wstrict-prototypes In my opinion requiring prototypes for all of your code is an absolute must and doubly so when porting from 32-bit to 64-bit. It is just too easy to find the original author using malloc() without a prototype in scope or a list of other things. Also remove any type casts from your code. They are almost not needed in any modern era programs. They are a legacy holdover from a time before prototypes. But people are still in the habit of using them. But legacy code tends to be full of them. Those are my best suggestions for the moment. Bob