Open jordr opened 1 year ago
Sorry, I won't be able to help in the near term. But I would be happy to consider PRs along these lines.
Thanks for the quick response, @inducer. I'll try to find a workaround.
@jordr the issue here is pycparserext is not aware of __alignof__
keyword. It needs to be added to the lexer and parser in a similar way to how __typeof
added here
Did you managed to solve this?
@jordr the issue here is pycparserext is not aware of
__alignof__
keyword. It needs to be added to the lexer and parser in a similar way to how__typeof
added hereDid you managed to solve this?
I believe I solved it the way you're describing in our fork a year ago, yes. My memory isn't that sharp though :)
@jordr it would be great if you could create a PR, or just add diff here as a comment(and i will do a PR). I have stumbled on the same issue, and would be happy not to implement the fix myself to save some time :)
@jordr it would be great if you could create a PR, or just add diff here as a comment(and i will do a PR). I have stumbled on the same issue, and would be happy not to implement the fix myself to save some time :)
I don't have time for looking much into it right now, sorry. Maybe this commit will be useful to you: https://github.com/statinf-software/pycparser/commit/deacf7d9ba4ed6c4476245023266da7d1ba3d2ec
Pycparser breaks on this example:
The error vanishes if I simplify the
__attribute__
or replace__alignof__
by (for example)sizeof
.__alignof__
is supported by GNU : https://gcc.gnu.org/onlinedocs/gcc-6.2.0/gcc/Alignment.htmlI was not able to engineer a good solution so far. Can we have a generic
__attribute__((whatever(foo(long long))))
solution or do we have to manually add__alignof__
keywords and the like?