Skip to content

Instantly share code, notes, and snippets.

@dwightguth
Created August 11, 2016 16:32
Show Gist options
  • Save dwightguth/6abf6bf5e0974de3604f5410f50230b6 to your computer and use it in GitHub Desktop.
Save dwightguth/6abf6bf5e0974de3604f5410f50230b6 to your computer and use it in GitHub Desktop.
#define restrict
#include<stdio.h>
int _foo = 100;
inline int value(int * restrict i) {
return *i * 4;
}
main() {
short int sum = 1;
for (int i = 0; i < _foo; i++) {
sum += value(&_foo);
}
int result = sum;
int diff = &diff - &result;
printf("%hd %#x\n", sum, diff);
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment