repo.or.cz
/
smatch.git
/
blob
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
log
|
graphiclog1
|
graphiclog2
|
commit
|
commitdiff
|
tree
|
refs
|
edit
|
fork
blame
|
history
|
raw
|
HEAD
testsuite: get all tags in once
[smatch.git]
/
validation
/
typeof-safe.c
blob
614863fba381b6fe420f52482532ae30eaf0563c
1
#define __safe __attribute__((safe))
2
3
static void
test_safe
(
void
)
4
{
5
int
__safe obj
, *
ptr
;
6
typeof
(
obj
)
var
=
obj
;
7
typeof
(
ptr
)
ptr2
=
ptr
;
8
typeof
(*
ptr
)
var2
=
obj
;
9
typeof
(*
ptr
) *
ptr3
=
ptr
;
10
typeof
(
obj
) *
ptr4
=
ptr
;
11
obj
=
obj
;
12
ptr
=
ptr
;
13
ptr
= &
obj
;
14
obj
= *
ptr
;
15
}
16
17
/*
18
* check-name: typeof-safe
19
* check-known-to-fail
20
*
21
* check-error-start
22
* check-error-end
23
*/