blob: 0b2f1d6af568d8c24462a53433d43e39031cb893 (
plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
|
struct foo {
char a[3];
char b;
char c;
};
struct foo bs;
int x;
char y[3];
void bar(void)
{
memcpy(bs.a, y, 3);
bs.a[1] = ((x ? &bs.b : &bs.c) - (char *)&bs) - 2;
}
|