3 ms·
Oh, good catch, thank you! But I remember an example with some other tricky C expression/type declarator where the number of actual dereferences differed from t
by Joker_vD 2y ago
Oh, good catch, thank you! But I remember an example with some other tricky C expression/type declarator where the number of actual dereferences differed from the amount of asterisks in the code.
> Using the notation you did, that would be:
Well, it'd be
func x() ^[5] ^func() char; ...
because it's a function declaration, after all, not a variable.
- trealira 2y ago> But I remember an example with some other tricky C expression/type declarator where the number of actual dereferences differed from the amount of asterisks in the code. Was it this code? void f(int *a) { void *p = &a; ***(int*(*)[])p = 1; } Reading your comment made me think of this. I tried to find the original post for this, but it seems it was deleted. I only found it again through this post: https://zig.news/sobeston/using-zig-and-translate-c-to-understand-weird-c-code-4f8 https://zig.news/sobeston/using-zig-and-translate-c-to-under...