mirror of
https://github.com/frida/tinycc
synced 2025-01-01 01:24:24 +03:00
23 lines
246 B
C
23 lines
246 B
C
|
#include <stdio.h>
|
||
|
|
||
|
union u {
|
||
|
unsigned long ul;
|
||
|
long double ld;
|
||
|
};
|
||
|
|
||
|
void
|
||
|
conv (union u *p)
|
||
|
{
|
||
|
p->ul = (unsigned int) p->ld;
|
||
|
}
|
||
|
|
||
|
int main (void)
|
||
|
{
|
||
|
union u v;
|
||
|
|
||
|
v.ld = 42;
|
||
|
conv (&v);
|
||
|
printf ("%lu\n", v.ul);
|
||
|
return 0;
|
||
|
}
|