[cfe-dev] Can't parse _Noreturn declarations with libclang python bindings

Henri Tuhola henri.tuhola at gmail.com
Tue Aug 27 12:54:05 PDT 2013


I've written an interpreter, which can access C libraries. It takes
this kind of source which it then executes:

(= lib (cdll "/usr/local/musl/lib/libc.so"
    "/usr/local/musl/include/unistd.h"
    "/usr/local/musl/include/stdlib.h"))

(def main ()
    (lib.write lib.STDOUT_FILENO "hello" 5))

It works otherwise well, I'll implement support for fetching C records
next, but it doesn't find header declarations for exit, abort, or any
other function that is prefixed with _Noreturn. I have no idea what I
need to get them. Why such attribute excludes them from libclang
anyway?

This work is a hobby experiment, so it's not really urgent. I haven't
put the source into github yet either. The ffi.py is below. Write back
if you need any other information.

http://bpaste.net/show/126833/

-- Henri Tuhola



More information about the cfe-dev mailing list