News for hackers. Stuff that matters.
Re:Checked C by 0xbadcafebee on Thursday December 22, 2022 @02:31AM (#34090798)
> an automated system to convert unsafe C into safe something

Can't we just make macros to redefine types as some 'safe' type variant system, and #include "safetypes.h" or something? It's ugly, but searching your source code for 'int a[5]' and replacing it with 'INT(a,5)' might be dumb enough to work.

Re:Checked C by friendzis on Thursday December 22, 2022 @03:20AM (#34091055)
Statically allocated/sized arrays are relatively easy. The problem is dynamically allocated/sized arrays coupled with pointer "interface", which supports type casting.
Re:Checked C by Animats on Thursday December 22, 2022 @05:22PM (#34099662)
Something smart enough to convert pointer arithmetic to slice expressions is needed. Most C pointer arithmetic is really just slice access.

(Who invented array slices? It was a concept that came along much later than one might have expected.)