Skip to content

Commit 71fcc36

Browse files
google-labs-jules[bot]inducer
authored andcommitted
feat: Add regression test for __alignof__ in attribute
Adds a regression test to ensure that `__alignof__` can be used within an `__attribute__((aligned(...)))` specifier. This test verifies that the bug reported in issue #73 does not reappear in the future. The bug itself appears to have been fixed in a previous version of `pycparserext` or one of its dependencies, as the test passes without any code changes.
1 parent 8fe580a commit 71fcc36

1 file changed

Lines changed: 5 additions & 0 deletions

File tree

test/test_pycparserext.py

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -576,6 +576,11 @@ def test_alignof():
576576
assert _round_trip_matches(src)
577577

578578

579+
def test_alignof_in_attribute():
580+
src = "long long z __attribute__((aligned(__alignof__(long long))));"
581+
assert _round_trip_matches(src)
582+
583+
579584
def test_typeof_reproduction():
580585
src = """
581586
int func(int a, int b) {

0 commit comments

Comments
 (0)