History

reject invalid arrays in post_type()

Pascal Cuoq committed 7 years ago

Commit cbbba011 parent 942b73b3 files · +39 −3Browse files

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

Unified · Split

2 files
  1. tests/tests2/60_errors_and_warnings.c +16 −0
  2. tests/tests2/60_errors_and_warnings.expect +15 −0
tests/tests2/60_errors_and_warnings.c+16−0
@@ -182,4 +182,20 @@ void * _Alignas(16) p1; · 181 unmodified lines
182 _Static_assert(ONE == 0, "don't show me this");182 _Static_assert(ONE == 0, "don't show me this");
183 _Static_assert(ONE == 1, "ONE is not 1");183 _Static_assert(ONE == 1, "ONE is not 1");
184 184
185#elif defined test_void_array
186 void t[3];
187
188#elif defined test_incomplete_enum_array
189 enum e t[3];
190
191#elif defined test_incomplete_struct_array
192 struct s t[3];
193
194#elif defined test_const_fun_array
195 typedef void f(void);
196 const f t[3];
197
198#elif defined test_incomplete_array_array
199 int t[][3];
200
185#endif201#endif
tests/tests2/60_errors_and_warnings.expect+15−0
@@ -86,3 +86,18 @@ · 85 unmodified lines
86 86
87[test_static_assert]87[test_static_assert]
8860_errors_and_warnings.c:183: error: "ONE is not 1"8860_errors_and_warnings.c:183: error: "ONE is not 1"
89
90[test_void_array]
9160_errors_and_warnings.c:186: error: declaration of an array of incomplete type elements
92
93[test_incomplete_enum_array]
9460_errors_and_warnings.c:189: error: declaration of an array of incomplete type elements
95
96[test_incomplete_struct_array]
9760_errors_and_warnings.c:192: error: declaration of an array of incomplete type elements
98
99[test_const_fun_array]
10060_errors_and_warnings.c:196: error: declaration of an array of functions
101
102[test_incomplete_array_array]
10360_errors_and_warnings.c:199: error: unknown type size

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