From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (qmail 27386 invoked by alias); 15 Mar 2002 16:56:02 -0000 Mailing-List: contact gcc-prs-help@gcc.gnu.org; run by ezmlm Precedence: bulk List-Archive: List-Post: List-Help: Sender: gcc-prs-owner@gcc.gnu.org Received: (qmail 27336 invoked by uid 71); 15 Mar 2002 16:56:01 -0000 Date: Fri, 15 Mar 2002 08:56:00 -0000 Message-ID: <20020315165601.27323.qmail@sources.redhat.com> To: nobody@gcc.gnu.org Cc: gcc-prs@gcc.gnu.org, From: "Dana, Eric" Subject: RE: preprocessor/5806: The preprocessor evaluates expression s in 64-bit, violating IS C++ 16.1.4 Reply-To: "Dana, Eric" X-SW-Source: 2002-03/txt/msg00525.txt.bz2 List-Id: The following reply was made to PR preprocessor/5806; it has been noted by GNATS. From: "Dana, Eric" To: "'Zack Weinberg'" , "Dana, Eric" Cc: "'Neil Booth'" , "'gcc-gnats@gcc.gnu.org'" , "Schoeller, Dick" Subject: RE: preprocessor/5806: The preprocessor evaluates expression s in 64-bit, violating IS C++ 16.1.4 Date: Fri, 15 Mar 2002 10:37:47 -0600 Zack, The config.guess output is: i386-sequent-sysv4 One possibility is to change the '#if ((~0UL) == 0xffffffffUL)' to '#if defined(__i386__)' which is predefined in the gcc compiler. You may have a better suggestion... Tnx... --Eric-- -----Original Message----- From: 'Zack Weinberg' [mailto:zack@codesourcery.com] Sent: Thursday, March 14, 2002 6:15 PM To: Dana, Eric Cc: 'Neil Booth'; 'gcc-gnats@gcc.gnu.org'; Schoeller, Dick Subject: Re: preprocessor/5806: The preprocessor evaluates expression s in 64-bit, violating IS C++ 16.1.4 On Thu, Mar 14, 2002 at 02:58:41PM -0600, Dana, Eric wrote: > Zack, > > Is there anything that can be done for 3.1? In it's present state, > Dynix cannot work properly as many of its include files test for > 32/64 bit using the preprocessor. For example: > > #if ((~0UL) == 0xffffffffUL) > typedef unsigned int size_t; /* ILP32 size_t */ > #else /* ((~0UL) == 0xffffffffUL) */ > typedef unsigned long size_t; /* LP64 size_t */ > #endif /* ((~0UL) == 0xffffffffUL) */ In the short term, a fixincludes hack is probably the right move. GCC almost certainly provides a predefined macro that you can use to detect the mode you're in -- tell me the output of config.guess and I can figure out what it should be. Then you have fixincludes look for that #if and change it to an appropriate test of the macro. zw