Closed Breush closed 5 years ago
Does not occur on Windows 10 x64. (Commit 1a4e25f14149428ff19f2da239abe54ff0083632).
On Tue, 2 Oct 2018 at 08:56 A. Breust notifications@github.com wrote:
package main
Token :: struct { // Empty };
main :: proc() { tokens : [dynamic]Token;
token : Token; append(&tokens, token);
}
The above code fails on Linux (other platforms are not tested) with:
/home/breusta/dev/odin/core/os/os_linux.odin(222:2) Runtime assertion
— You are receiving this because you are subscribed to this thread. Reply to this email directly, view it on GitHub https://github.com/odin-lang/Odin/issues/267, or mute the thread https://github.com/notifications/unsubscribe-auth/ABST0KHU8aZBBDZH-vQPl9guEGqMHB-Oks5ugyo4gaJpZM4XDmd3 .
Currently in Odin, size_of(struct{})
is 0 whilst in C/C++ it is 1. I am not so sure what the best approach is for this. And I have a hunch that this may be partially the reason for the bug.
The above code fails on Linux (other platforms are not tested) with: