-
Notifications
You must be signed in to change notification settings - Fork 77
Open
Labels
enhancementNew feature or requestNew feature or request
Description
#include <stdbool.h>
#include <stddef.h>
#include <stdint.h>
bool f(void) {
return (size_t)0 < SIZE_MAX;
}zig translate-c foo.h -lc -target x86_64-windows-msvc
error: translation failure
foo.h:6:24: error: invalid suffix 'ui64' on integer constant
return (size_t)0 < SIZE_MAX;
^
C:\Program Files (x86)\Microsoft Visual Studio\2022\BuildTools\VC\Tools\MSVC\14.44.35207\include\stdint.h:108:26: note: expanded from here
#define SIZE_MAX 0xffffffffffffffffui64
i64 and ui64 (case-insensitive) are officially documented MSVC integer suffix extensions.
https://learn.microsoft.com/en-us/cpp/c-language/c-integer-constants?view=msvc-170
Apparently i8, ui8, i16, ui16, i32 and ui32 are also supported, but undocumented, and are used by MSVC headers for e.g. #define UINT8_MAX 0xffui8.
https://stackoverflow.com/questions/33659846/microsoft-integer-literal-extensions-where-documented
Reactions are currently unavailable
Metadata
Metadata
Assignees
Labels
enhancementNew feature or requestNew feature or request