Skip to content

Instantly share code, notes, and snippets.

@alanduan
Created August 21, 2016 05:18
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save alanduan/b9f13e5099de768a61657dbb10dab8b1 to your computer and use it in GitHub Desktop.
Save alanduan/b9f13e5099de768a61657dbb10dab8b1 to your computer and use it in GitHub Desktop.
gotcha~
#include <iostream>
struct one_bit_t
{
signed value : 1;
};
int main()
{
one_bit_t a;
a.value = true;
std::cout << a.value << std::endl;
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment