Joined: Aug 2008
redefinition of typedef 'u*' in System.h
The one bug I found while developing my frontend is that System.h has multiple typedefs for u8, u16 and u32. The first set uses the stdint types, and the second uses "unsigned char" etc.
For some reason this compiles fine with CMake, but I couldn't for the life of me get it to compile with GCC 4. It kept giving me errors like "Redefinition of typedef 'u8'". I just deleted the extras from System.h and it worked fine, but I just now remembered it.
I didn't report it because it's acceptable in C++, but it still seems weird to me. For reference, the code in question is
typedef uint8_t u8;
typedef uint16_t u16;
typedef uint32_t u32;
typedef uint64_t u64;
typedef unsigned char u8;
typedef unsigned short u16;
typedef unsigned int u32;
That second set will fail anyway if sizeof int is != 4. It seems a little silly to be using these abbreviations since stdint.h is part of C99, though I realize that may not have been the case when VBA was first developed. Perhaps this is something we could flag for a core rewrite?
EDIT: I forgot why I didn't report it earlier, and now I have remembered.
(This post was last modified: 10-15-2008 06:42 PM by KunaiTeam.)
|10-15-2008 06:36 PM
User(s) browsing this thread: 1 Guest(s)