Skip to content

Aro does not define __INT32_C() and friends #968

@alexrp

Description

@alexrp
❯ clang -dM -E - < /dev/null | grep '__INT.*_C('
#define __INT16_C(c) c
#define __INT32_C(c) c
#define __INT64_C(c) c##L
#define __INT8_C(c) c
#define __INTMAX_C(c) c##L

Trying to use Clang's stdint.h with translate-c and without libc linked:

error: translation failure
/home/alexrp/Sources/ziglang/zig/lib/include/stdint.h:822:23: error: function-like macro '__INT32_C' is not defined
# if __WCHAR_MAX__ == __INTN_MAX(__WCHAR_WIDTH__)
                      ^
/home/alexrp/Sources/ziglang/zig/lib/include/stdint.h:765:25: note: expanded from here
#define  __INTN_MAX(n)  __stdint_join3( INT, n, _MAX)
                        ^
/home/alexrp/Sources/ziglang/zig/lib/include/stdint.h:291:31: note: expanded from here
#define __stdint_join3(a,b,c) a ## b ## c
                              ^
/home/alexrp/Sources/ziglang/zig/lib/include/stdint.h:822:23: note: expanded from here
# if __WCHAR_MAX__ == __INTN_MAX(__WCHAR_WIDTH__)
                      ^
/home/alexrp/Sources/ziglang/zig/lib/include/stdint.h:765:41: note: expanded from here
#define  __INTN_MAX(n)  __stdint_join3( INT, n, _MAX)
                                        ^
/home/alexrp/Sources/ziglang/zig/lib/include/stdint.h:591:30: note: expanded from here
# define INT32_MAX           INT32_C(2147483647)
                             ^
/home/alexrp/Sources/ziglang/zig/lib/include/stdint.h:349:20: note: expanded from here
#define INT32_C(v) __INT32_C(v)
                   ^
error: 2 compilation errors

Metadata

Metadata

Assignees

No one assigned

    Labels

    bugSomething isn't working

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions