History

tccgen.c: In parse_btype, handle type qualifiers applied to arrays.

Also add some test cases in tests/tests2/39_typedef.c.

Edmund Grimley Evans committed 10 years ago

Commit f75f89f1 parent 541b3352 files · +41 −14Browse files

Showing the changes to tests (1 of 2 files). Show all

Unified · Split

tests/tests2/39_typedef.c+16−0
@@ -28,4 +28,20 @@ int main() · 27 unmodified lines
2828 return 0;
2929 }
3030
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+
3147 /* vim: set expandtab ts=4 sw=3 sts=3 tw=80 :*/

Keyboard shortcuts

General

Show keyboard shortcuts
?
Focus the current search
/

Issues and pull requests

Open filters
f

Issues, pull requests and Inbox

Select next item
j↓
Select previous item
k↑
Open selected item
Enter
Dismiss filters or clear selection
Esc

Repository code

Go to file
t