Also add some test cases in tests/tests2/39_typedef.c.
Showing the changes to tests (1 of 2 files). Show all
Unified · Split
| @@ -28,4 +28,20 @@ int main() · 27 unmodified lines | ||
| 28 | 28 | return 0; |
| 29 | 29 | } |
| 30 | 30 | |
| 31 | +/* "If the specification of an array type includes any type qualifiers, | |
| 32 | + the element type is so-qualified, not the array type." */ | |
| 33 | + | |
| 34 | +typedef int A[3]; | |
| 35 | +extern A const ca; | |
| 36 | +extern const A ca; | |
| 37 | +extern const int ca[3]; | |
| 38 | + | |
| 39 | +typedef A B[1][2]; | |
| 40 | +extern B const cb; | |
| 41 | +extern const B cb; | |
| 42 | +extern const int cb[1][2][3]; | |
| 43 | + | |
| 44 | +extern B b; | |
| 45 | +extern int b[1][2][3]; | |
| 46 | + | |
| 31 | 47 | /* vim: set expandtab ts=4 sw=3 sts=3 tw=80 :*/ |