arocc icon indicating copy to clipboard operation
arocc copied to clipboard

Integer literal promotion rules should emulate chosen compiler

Open ehaas opened this issue 1 year ago • 0 comments

GCC and clang behave differently with regard to unsuffixed integer literals; see comment here https://github.com/ziglang/zig/issues/19701#issuecomment-2067190162 Note: MSVC follows the clang behavior of promoting to unsigned long long

The current behavior is implemented here: https://github.com/Vexu/arocc/blob/f60a2deae086dc9f60eb0f5ab417eb9a59c6b44c/src/aro/Parser.zig#L8395-L8402

ehaas avatar Apr 22 '24 15:04 ehaas