diff options
| author | Edmund Grimley Evans <Edmund.Grimley.Evans@gmail.com> | 2016-01-11 07:51:58 +0000 |
|---|---|---|
| committer | Edmund Grimley Evans <Edmund.Grimley.Evans@gmail.com> | 2016-01-11 07:51:58 +0000 |
| commit | f75f89fc8f2116c4cfe35022c19ed854e6a23b84 (patch) | |
| tree | 55f1b9323ba30ba8f7e41583647a588c0267dad6 /tests | |
| parent | 541b33591c74103d398750016b0c9557dafba0c6 (diff) | |
| download | tinycc-f75f89fc8f2116c4cfe35022c19ed854e6a23b84.tar.gz tinycc-f75f89fc8f2116c4cfe35022c19ed854e6a23b84.tar.bz2 | |
tccgen.c: In parse_btype, handle type qualifiers applied to arrays.
Also add some test cases in tests/tests2/39_typedef.c.
Diffstat (limited to 'tests')
| -rw-r--r-- | tests/tests2/39_typedef.c | 16 |
1 files changed, 16 insertions, 0 deletions
diff --git a/tests/tests2/39_typedef.c b/tests/tests2/39_typedef.c index 79ab58b..3878b9c 100644 --- a/tests/tests2/39_typedef.c +++ b/tests/tests2/39_typedef.c @@ -28,4 +28,20 @@ int main() return 0; } +/* "If the specification of an array type includes any type qualifiers, + the element type is so-qualified, not the array type." */ + +typedef int A[3]; +extern A const ca; +extern const A ca; +extern const int ca[3]; + +typedef A B[1][2]; +extern B const cb; +extern const B cb; +extern const int cb[1][2][3]; + +extern B b; +extern int b[1][2][3]; + /* vim: set expandtab ts=4 sw=3 sts=3 tw=80 :*/ |
