blob: bd2ffa90051a6b2d17d8a77f3d962b56d095496e (
plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
|
extern int i;
int foo(void)
{
return *i;
}
int bar(void)
{
return i[0];
}
int *qux(void)
{
return &i[0];
}
/*
* check-name: premature-examination
* check-command: sparse -Wno-decl $file
*
* check-error-start
eval/premature-examination.c:5:16: error: cannot dereference this type
eval/premature-examination.c:10:17: error: cannot dereference this type
eval/premature-examination.c:15:18: error: cannot dereference this type
* check-error-end
*/
|