Comment on A New Development for Coverity and HeartbleedparentComments−dbaupp12yTypedefs in C are just aliases, so given `typedef int foo;` one can freely use `int`s and `foo`s interchangeably, i.e. no checking by the compiler.That said, one could use actual wrapper structs around the various types.−skybrian12yA static analysis framework could treat certain typedefs specially since it's parsing the C code anyway.−marshray12yGreat idea! Too bad openssl uses #define instead−johnkeeping12yThere's also sparse[0]'s address space annotation, which Linux uses for annotating data from userspace.[0] https://git.kernel.org/cgit/devel/sparse/sparse.git/
Comments
Typedefs in C are just aliases, so given `typedef int foo;` one can freely use `int`s and `foo`s interchangeably, i.e. no checking by the compiler.
That said, one could use actual wrapper structs around the various types.
A static analysis framework could treat certain typedefs specially since it's parsing the C code anyway.
Great idea! Too bad openssl uses #define instead
There's also sparse[0]'s address space annotation, which Linux uses for annotating data from userspace.
[0] https://git.kernel.org/cgit/devel/sparse/sparse.git/