Re:Using Zig's translate-C to understand weird C code
by dosshell on Wednesday November 03, 2021 @07:54AM
(#29093420)
Or like use https://cppinsights.io/ ...
[ Parent
| on HN ]
Re:Using Zig's translate-C to understand weird C code
by michaelmior on Wednesday November 03, 2021 @08:10AM
(#29093531)
That gives the following output which I don't think is much more readable.
void f(int * a)
{
void * p = reinterpret_cast<void *>(&a);
***reinterpret_cast<int *(*)[]>(p) = 1;
}
Re:Using Zig's translate-C to understand weird C code
by cies on Wednesday November 03, 2021 @08:17AM
(#29093572)
Maybe after several steps of manual processing it is :)
(not sure what steps that should be)
Re:Using Zig's translate-C to understand weird C code
by michaelmior on Wednesday November 03, 2021 @11:33AM
(#29096090)
Sure but I don't think C++ Insights really helped.