Skip to content

Instantly share code, notes, and snippets.

@lucyllewy
Created February 3, 2014 18:04
Show Gist options
  • Save lucyllewy/8789010 to your computer and use it in GitHub Desktop.
Save lucyllewy/8789010 to your computer and use it in GitHub Desktop.
this fails in emscripten with the printf reporting that the variable is 0 instead of my expected 4096 (causing issues in bochs compile)
#include <stdio.h>
#include <stdlib.h>
#define TEST 32
int main(int argc, char **argv) {
unsigned long int test = ((unsigned long int)(1) << TEST) / (1024*1024);
printf("%d should be %d", test, 4096);
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment