I searched the repository for the word 'weak' and the only place I can see it mentioned in in a few issues. It seems to me that this attribute could probably be parsed and stored as part of the funcspec or storage class specifier of FuncDef, since those are already represented as lists.
I'm not actually sure what syntactic category the weak attribute is normally included in; most the the references for both function specifiers and storage class specifiers ignore it, and it does technically apply to both functions and global variables, though I can't remember ever seeing the later utilized.
pycparser will not support __attribute__ since it's not standard C. You can define them away with the preprocessor (e.g. -D'__attribute__(x)=') which will make the code parse-able.
I searched the repository for the word 'weak' and the only place I can see it mentioned in in a few issues. It seems to me that this attribute could probably be parsed and stored as part of the funcspec or storage class specifier of FuncDef, since those are already represented as lists.
I'm not actually sure what syntactic category the weak attribute is normally included in; most the the references for both function specifiers and storage class specifiers ignore it, and it does technically apply to both functions and global variables, though I can't remember ever seeing the later utilized.