[GCC-XML] gccxml chokes on MS integer suffixes
Thomas Heller
theller at python.net
Fri Mar 18 05:33:19 EST 2005
Thomas Heller <theller at python.net> writes:
> Brad King <brad.king at kitware.com> writes:
>
>> Thomas Heller wrote:
>>> gccxml chokes on integer suffixes defined in MS header file limits.h.
>>> I don't know if its worth to fix it, whether it should be fixed with a
>>> patch to the header file, or it it should be fixed in gccxml itself.
>>> I just wanted to report it.
>>> Excerpt from the file:
>>> #if _INTEGRAL_MAX_BITS >= 32
>>> #define _I32_MIN (-2147483647i32 - 1) /* minimum signed 32 bit value */
>>> #define _I32_MAX 2147483647i32 /* maximum signed 32 bit value */
>>> #define _UI32_MAX 0xffffffffui32 /* maximum unsigned 32 bit value */
>>> #endif
>>> gccxml doesn't like the i32 or ui32 suffixes (there are i8, i16, i32,
>>> i64, i128 and other variants in the file).
>>
>> Please report this to the bug tracker:
>>
>> http://www.gccxml.org/Bug
>>
>> -Brad
>
> http://www.gccxml.org/Bug/bug.php?op=show&bugid=1683&pos=3
Thanks for the quick fix, Brad.
Here's the next problem, in case you aren't tired of me yet:
C:\sf\ctypes\ctypes\wrap>type x.c
#include <limits.h>
int main()
{
long long x = LLONG_MAX;
}
C:\sf\ctypes\ctypes\wrap>cl -c x.c
Microsoft (R) 32-bit C/C++ Optimizing Compiler Version 13.10.3077 for 80x86
Copyright (C) Microsoft Corporation 1984-2002. All rights reserved.
x.c
C:\sf\ctypes\ctypes\wrap>\Programme\gccxml\bin\gccxml x.c
x.c: In function `int main()':
x.c:4: error: integer constant is too large for "long" type
C:\sf\ctypes\ctypes\wrap>
<limits.h> from MSVC7.1 contains:
/* Make sure these macros don't show up in ANSI C++ code */
#if !defined(__cplusplus) || defined(_MSC_EXTENSIONS)
#define LLONG_MAX 0x7fffffffffffffff /*maximum signed __int64 value */
#define LLONG_MIN 0x8000000000000000 /*minimum signed __int64 value */
#define ULLONG_MAX 0xffffffffffffffff /*maximum unsigned __int64 value */
#endif
Uploaded to the bug tracker as
http://www.gccxml.org/Bug/bug.php?op=show&bugid=1685&pos=5
Thomas
More information about the gccxml
mailing list