News for hackers. Stuff that matters.
Re:Modern C for C++ Peeps by moloch-hai on Saturday January 07, 2023 @11:00AM (#34289267)
The only bad or misleading typedef is one that conceals that a type is a pointer or reference, and therefore implicitly converts to another type.

Technically, int32_t is bad in that way, but we are not fooled by it.

Re:Modern C for C++ Peeps by unsafecast on Saturday January 07, 2023 @03:42PM (#34292538)
> Technically, int32_t is bad in that way, but we are not fooled by it.

Meaning? On my system int32_t is directly typedefed to unsigned int, absolutely no hidden pointers or conversions.

Re:Modern C for C++ Peeps by moloch-hai on Saturday January 07, 2023 @05:22PM (#34293596)
int32_t promotes to long, converts to unsigned, and truncates to short and char, all silently.