pycparserext seems to be inserting an empty __attribute__ list when * should occur. This can be reproduced by this POC with pycparserext installed from the master branch:
#!/usr/bin/env python
from pycparserext import ext_c_parser, ext_c_generator
src = '''
struct foo {
const char *bar;
const char *baz;
};
int main () {
return 0;
}
'''
parser = ext_c_parser.GnuCParser()
ast = parser.parse(src)
gen = ext_c_generator.GnuCGenerator()
print gen.visit(ast)
Running this program results in the following output:
struct foo
{
const char bar __attribute__(());
const char baz __attribute__(());
};
int main()
{
return 0;
}
I'm not very familiar with the codebase, but for what its worth I think the bug may occur during parsing rather than generation.
Thanks for all the good work on this project so far.
Hello,
pycparserext seems to be inserting an empty
__attribute__
list when*
should occur. This can be reproduced by this POC with pycparserext installed from the master branch:Running this program results in the following output:
I'm not very familiar with the codebase, but for what its worth I think the bug may occur during parsing rather than generation.
Thanks for all the good work on this project so far.