Closed fuhsnn closed 11 months ago
Per n1548 7.19-3:
n1548
7.19-3
offsetof ... expands to an integer constant expression that has type size_t #include <stddef.h> struct S { float f; int i; }; int arr [offsetof(struct S, i)]; int sz = sizeof arr; chibicc sees arr as VLA and crashes at sz trying to resolve the size.
offsetof ... expands to an integer constant expression that has type size_t
#include <stddef.h> struct S { float f; int i; }; int arr [offsetof(struct S, i)]; int sz = sizeof arr;
chibicc sees arr as VLA and crashes at sz trying to resolve the size.
arr
sz
Per
n1548
7.19-3
: