From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (qmail 635 invoked by alias); 14 Mar 2002 23:16:04 -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 603 invoked by uid 71); 14 Mar 2002 23:16:03 -0000 Date: Thu, 14 Mar 2002 15:16:00 -0000 Message-ID: <20020314231603.597.qmail@sources.redhat.com> To: nobody@gcc.gnu.org Cc: gcc-prs@gcc.gnu.org, From: 'Zack Weinberg' Subject: Re: preprocessor/5806: The preprocessor evaluates expression s in 64-bit, violating IS C++ 16.1.4 Reply-To: 'Zack Weinberg' X-SW-Source: 2002-03/txt/msg00487.txt.bz2 List-Id: The following reply was made to PR preprocessor/5806; it has been noted by GNATS. From: 'Zack Weinberg' 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 Date: Thu, 14 Mar 2002 15:14:39 -0800 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