2016-01-24から1日間の記事一覧
環境とコンパイラのバージョン CentOS7 64bit clang 3.4.2 FooBar構造体を定義して1bit(bit0)のfooと3bit(bit1-3)のbarを定義して、1byteの値cをキャストして取り出しています。 #include <stdio.h> struct FooBar { unsigned char foo:1; // bit0 unsigned char bar:</stdio.h>…
環境とコンパイラのバージョン CentOS7 64bit clang 3.4.2 FooBar構造体を定義して1bit(bit0)のfooと3bit(bit1-3)のbarを定義して、1byteの値cをキャストして取り出しています。 #include <stdio.h> struct FooBar { unsigned char foo:1; // bit0 unsigned char bar:</stdio.h>…