preprocessor/5806: The preprocessor evaluates expression s in 64-bit, violating IS C++ 16.1.4
Dana, Eric
Eric_Dana@bmc.com
Fri Mar 15 08:56:00 GMT 2002
The following reply was made to PR preprocessor/5806; it has been noted by GNATS.
From: "Dana, Eric" <Eric_Dana@bmc.com>
To: "'Zack Weinberg'" <zack@codesourcery.com>,
"Dana, Eric"
<Eric_Dana@bmc.com>
Cc: "'Neil Booth'" <neil@daikokuya.demon.co.uk>,
"'gcc-gnats@gcc.gnu.org'"
<gcc-gnats@gcc.gnu.org>,
"Schoeller, Dick" <Dick_Schoeller@bmc.com>
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
More information about the Gcc-prs
mailing list