1 #include <stdint.h> 2 3 struct Foo { 4 int8_t a; 5 int16_t b; 6 }; 7 main(int argc,char const * argv[])8int main (int argc, char const *argv[]) { 9 struct Foo f; 10 return f.a; //% self.expect("expr offsetof(Foo, a)", substrs = ['= 0']) 11 //% self.expect("expr offsetof(Foo, b)", substrs = ['= 2']) 12 } 13