pycparserext
pycparserext copied to clipboard
Parse error on function with attribute returning a pointer
This code is OK:
int __attribute__((__nothrow__)) fct() {}
but this one failed:
int * __attribute__((__nothrow__)) fct() {}
Error given is:
pycparser.plyparser.ParseError: :1:7: before: __attribute__
I tried to fix this bug myself, without success.
I discovered that when trying to parse stdio.h from Mingw. Preprocessed sample:
__attribute__ ((__dllimport__)) FILE *__attribute__((__cdecl__)) _fsopen(const char *_Filename,const char *_Mode,int _ShFlag);
Thanks for reporting this issue. I unfortunately do not have the spare cycles to debug this at this moment, but I'd be happy to take a patch.