Veikka Tuominen

Results 363 comments of Veikka Tuominen

Closing in favor of the more complete solution.

```sh-session $ arocc a.c --verbose-ast --target=x86_64-windows-msvc struct_decl_two: 'struct (anonymous struct at a.c:1:30)' record_field_decl: 'int' name: a typedef: 'attributed(struct (anonymous struct at a.c:1:30))' attr: aligned alignment: Attribute.Alignment{ .node = Tree.NodeIndex.none, .requested...

> Maybe because the attributes are before `typedef` in the MSVC version? That would be it, the same happens if you put the `__attribute__` before the typedef: ```c __attribute__((aligned(2))) typedef...

Stack traces get their source locations via a different mechanism so those are unlikely to be related.

> I like that Vexu already knew to tag it stage2 even before we realized it was in fact a stage2 output. I test each new bug that is reported....

Worth noting that this used to work properly before c76b5c1a31ebe09726cd29e7a6da69613eabfd10 so that fix might have been (at least partially) incorrect.

The ABI-sized restriction is related to Zig's packed structs which are fancy integers, not C's packed structs which are just differently aligned regular structs. This is confusing and why IMO...

> `@ptrToInt` at comptime is something that sort of needs to work. Without it, there's a pretty strange line for what compiles and what doesn't. For example, code which does...

> This features should exist. There is no justification for removing it. > Inspecting own PE Header for example is one reason. Getting PEB on Windows requires a hard coded...

The issue seems to be caused by comptime slices: ```zig pub fn makeArray1() [4]u8 { var result = std.mem.zeroes([4]u8); std.mem.writeIntBig(u32, result[0..4], 0xabcdabcd); return result; } pub fn makeArray2() [4]u8 {...