Created
September 27, 2013 17:57
-
-
Save cjfuller/6732470 to your computer and use it in GitHub Desktop.
testing the effects of volatile
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#include <stdlib.h> | |
typedef unsigned long VALUE; | |
int main() { | |
VALUE x = 0; | |
volatile VALUE y = 1; | |
VALUE* a = malloc(sizeof(VALUE)); | |
volatile VALUE* b = malloc(sizeof(VALUE)); | |
*b = x; | |
return 0; | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment