Skip to content

Conversation

@douglas-raillard-arm
Copy link
Contributor

No description provided.

@douglas-raillard-arm douglas-raillard-arm changed the title Fix arr attributes Fix array attributes Sep 8, 2023
The declaration:

    int arr[2] __attribute__((deprecated));

is currently parsed as:

    int arr __attribute__((deprecated));
Ensure that ArrayDecl() layer is not lost when attaching attributes.
assert isinstance(ast.ext[0].type, ArrayDecl)

from pycparserext.ext_c_generator import GnuCGenerator
print(GnuCGenerator().visit(ast))
Copy link
Owner

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Would it be reasonable to assert that the round trip works?

@douglas-raillard-arm
Copy link
Contributor Author

@inducer Unfortunately I stopped using pycparserext (instead of parsing a pre-existing header made by another tool, I made a tool that creates the header in the first place) and I don't have the bandwidth to fix pycparserext. Feel free to re-own this PR if someone else wants to take over.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants