Advertisement
OrenWatson

the only union youll ever need

Dec 11th, 2014
196
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
C 0.59 KB | None | 0 0
  1. union reinterp_u {
  2.     int8_t i8;
  3.     uint8_t u8;
  4.     int16_t i16;
  5.     uint16_t u16;
  6.     int32_t i32;
  7.     uint32_t u32;
  8.     int64_t i64;
  9.     uint64_t u64;
  10.     char c;
  11.     short s;
  12.     int i;
  13.     long l;
  14.     long long ll;
  15.     signed sg;
  16.     signed char sgc;
  17.     signed short sgs;
  18.     signed int sgi;
  19.     signed long sgl;
  20.     signed long long sgll;
  21.     unsigned ug;
  22.     unsigned char ugc;
  23.     unsigned short ugs;
  24.     unsigned int ugi;
  25.     unsigned long ugl;
  26.     unsigned long long ugll;
  27.     float f;
  28.     double d;
  29.     long double ld;
  30.     __float80 f80;
  31.     __float128 f128;
  32.     _Decimal32 D32;
  33.     _Decimal64 D64;
  34.     _Decimal128 D128;
  35.     union reinterp_u *p;
  36.     void *vp;
  37. };
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement