John Leuner wrote:
>> I have been looking into this area and it is far from simple. If anyone has 
>> any leads in this area they would be more than welcome.
> 
> How difficult is it to implement a straight-forward type checker for C?
> Since the user has to declare the types of variables and functions is
> there much left to do? Is it necessary to do any control flow analysis,
> or is that only for optimization?
> 

Pointer casts, unions and implicit conversions between arrays and pointers are
some of the loop holes in C's type system.  I have a somewhat portable
implementation of the C type system in written in C, if people are interested.

http://github.com/kstephens/ll/tree/master/src/ct

It was orignally intended to generate dynamic and static FFIs for embedded
languages.  There is some support for C type introspection using debugging
symbols or parsing C headers.

Kurt

_______________________________________________
fonc mailing list
fonc@vpri.org
http://vpri.org/mailman/listinfo/fonc

Reply via email to