Permalink
Browse files

Add another union example from glibc headers

  • Loading branch information...
mstorsjo committed Sep 7, 2012
1 parent db72761 commit 1d14a7a7cd4a426c7cc699e566bf23ec5efd8784
Showing with 7 additions and 0 deletions.
  1. +7 −0 unit2.c
View
@@ -128,6 +128,13 @@ static double tget_double(int le)
return i.f64;
}
+extern __inline __attribute__ ((__always_inline__)) __attribute__ ((__gnu_inline__, __artificial__)) int
+__attribute__ ((__nothrow__ , __leaf__)) __signbitl (long double __x)
+{
+ __extension__ union { long double __l; int __i[3]; } __u = { __l: __x };
+ return (__u.__i[2] & 0x8000) != 0;
+}
+
int main(int argc, char *argv[])
{
return pix_fmt_info[argc].depth;

0 comments on commit 1d14a7a

Please sign in to comment.