From e3f1cddf7aabc936488c8969231f22fafcee5c33 Mon Sep 17 00:00:00 2001 From: Andreas Kloeckner Date: Tue, 26 Nov 2024 11:37:39 -0600 Subject: [PATCH] Add test for non-dropping of pointer with attribute Closes gh-86 --- test/test_pycparserext.py | 6 ++++++ 1 file changed, 6 insertions(+) diff --git a/test/test_pycparserext.py b/test/test_pycparserext.py index 9c0c19c..627d766 100644 --- a/test/test_pycparserext.py +++ b/test/test_pycparserext.py @@ -126,6 +126,12 @@ def test_asm_label(): assert _round_trip_matches(src) +def test_pointer_with_attr(): + # https://github.com/inducer/pycparserext/issues/86 + src = "typedef float * __attribute__((abc)) b;" + assert _round_trip_matches(src) + + def test_funky_header_code(): src = """ extern __inline int __attribute__ ((__nothrow__)) __signbitf (float __x)