Closed sertonix closed 2 months ago
pycparser seems to be unable to parse typeof (or __typeof__). For example this code
typeof
__typeof__
typedef __typeof__(int *) test;
fails to compile with this error pycparser.plyparser.ParseError: c_files/test.c:2:27: before: test but is valid C code.
pycparser.plyparser.ParseError: c_files/test.c:2:27: before: test
Doc: https://gcc.gnu.org/onlinedocs/gcc/Typeof.html
Is it ISO C or a gcc extension?
The gcc doc states that __typeof__ is OSI C. I can't find the OSI C spec to verify it.
For gnu extension support, consider https://github.com/inducer/pycparserext
pycparser seems to be unable to parse
typeof
(or__typeof__
). For example this codefails to compile with this error
pycparser.plyparser.ParseError: c_files/test.c:2:27: before: test
but is valid C code.Doc: https://gcc.gnu.org/onlinedocs/gcc/Typeof.html