blob: 31c1ae0769c77b9605e67de4b63b43750e371214 (
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
28
29
30
31
32
33
|
/* The bit-field below would have a problem if __INT_MAX__ is too
small. */
#if __INT_MAX__ < 2147483647
int
main (void)
{
exit (0);
}
#else
/*
CONF:m68k-sun-sunos4.1.1
OPTIONS:-O
*/
struct T
{
unsigned i:8;
unsigned c:24;
};
f(struct T t)
{
struct T s[1];
s[0]=t;
return(char)s->c;
}
main()
{
struct T t;
t.i=0xff;
t.c=0xffff11;
if(f(t)!=0x11)abort();
exit(0);
}
#endif
|