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
simplify '(x / -1)' to '-x' (but only for signed division)
[smatch.git]
/
validation
/
transparent-union.c
blob
149c7d947683d81fd267efe135d1d2d6490a44aa
1
struct
a
{
2
int
field
;
3
};
4
struct
b
{
5
int
field
;
6
};
7
8
typedef
union
{
9
struct
a
*
a
;
10
struct
b
*
b
;
11
}
transparent_arg
__attribute__
((
__transparent_union__
));
12
13
static void
foo
(
transparent_arg arg
)
14
{
15
}
16
17
static void
bar
(
void
)
18
{
19
struct
b arg
= {
0
};
20
foo
((
struct
a
*) &
arg
);
21
}
22
23
/*
24
* check-name: Transparent union attribute.
25
*/