From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (qmail 2145 invoked by alias); 12 Jan 2008 03:02:48 -0000 Received: (qmail 2095 invoked by uid 22791); 12 Jan 2008 03:02:47 -0000 X-Spam-Check-By: sourceware.org Received: from wa-out-1112.google.com (HELO wa-out-1112.google.com) (209.85.146.182) by sourceware.org (qpsmtpd/0.31) with ESMTP; Sat, 12 Jan 2008 03:02:30 +0000 Received: by wa-out-1112.google.com with SMTP id m16so2057235waf.20 for ; Fri, 11 Jan 2008 19:02:28 -0800 (PST) Received: by 10.114.177.1 with SMTP id z1mr628851wae.7.1200106948455; Fri, 11 Jan 2008 19:02:28 -0800 (PST) Received: by 10.114.144.5 with HTTP; Fri, 11 Jan 2008 19:02:28 -0800 (PST) Message-ID: <4348dea50801111902s6e0881br8a86c98b3ab36f71@mail.gmail.com> Date: Mon, 14 Jan 2008 03:20:00 -0000 From: "Jonathan Wakely" To: "Brian D. McGrew" Subject: Re: 64-Bit Operator Overloading Adventure Cc: gcc-help@gcc.gnu.org In-Reply-To: <01CB178573DD65409C3958440EF758AD106D39@mvpexchange126.machinevisionproducts.com> MIME-Version: 1.0 Content-Type: text/plain; charset=ISO-8859-1 Content-Transfer-Encoding: 7bit Content-Disposition: inline References: <01CB178573DD65409C3958440EF758AD106D39@mvpexchange126.machinevisionproducts.com> Mailing-List: contact gcc-help-help@gcc.gnu.org; run by ezmlm Precedence: bulk List-Id: List-Archive: List-Post: List-Help: Sender: gcc-help-owner@gcc.gnu.org X-SW-Source: 2008-01/txt/msg00110.txt.bz2 On 11/01/2008, Brian D. McGrew wrote: > Good morning, Hi, I've only replied to gcc-help as this is not related to development of GCC. > I've got a codebase that's a hundred years old, started in life on Sun3 > and have evolved to 32-Bit X86 Linux (Fedora 5). We're trying to move > to 64-Bit now and this same code that has compiled for years is barking > about operators cannot be overloaded. Without more detail it's hard to know, but it sounds like you might have overloads using typedefs where the underlying type has changed. e.g. #ifdef IN_32_BIT_MODE typedef long foo_t; #else typedef int foo_t; #endif struct S { S operator+(int); S operator+(foo_t); }; This will only compile if IN_32_BIT_MODE is defined. Alternatively, the changes you've made to change longs to ints could cause a problem in code like this: typedef int bar_t; struct S { S operator+(long); // change to int S operator+(bar_t); }; Jon