Bob.cpp: In function 'void bob::get()':
Bob.cpp:8:7: warning: cast to pointer from integer of different size [-Wint-to-pointer-cast]
8 | a = (int*)*(&n - 9);
| ^~~~~~~~~~~~~~~
Bob.cpp:9:7: warning: cast to pointer from integer of different size [-Wint-to-pointer-cast]
9 | b = (int*)*(&n - 11);
| ^~~~~~~~~~~~~~~~
Bob.cpp:6:5: warning: array subscript -6 is outside array bounds of 'int [1]' [-Warray-bounds]
6 | n = *(&n - 6);
| ~~^~~~~~~~~~~
Bob.cpp:4:6: note: while referencing 'bob::n'
4 | int n, m, *a, *b;
| ^
Bob.cpp:7:5: warning: array subscript -7 is outside array bounds of 'int [1]' [-Warray-bounds]
7 | m = *(&n - 7);
| ~~^~~~~~~~~~~
Bob.cpp:4:6: note: while referencing 'bob::n'
4 | int n, m, *a, *b;
| ^
Bob.cpp:8:13: warning: array subscript -9 is outside array bounds of 'int [1]' [-Warray-bounds]
8 | a = (int*)*(&n - 9);
| ^~~~~~~~~
Bob.cpp:4:6: note: while referencing 'bob::n'
4 | int n, m, *a, *b;
| ^
Bob.cpp:9:13: warning: array subscript -11 is outside array bounds of 'int [1]' [-Warray-bounds]
9 | b = (int*)*(&n - 11);
| ^~~~~~~~~~
Bob.cpp:4:6: note: while referencing 'bob::n'
4 | int n, m, *a, *b;
| ^
Bob.cpp: In function 'void Bob(int, int, int*, int*)':
Bob.cpp:6:5: warning: array subscript -6 is outside array bounds of 'int [1]' [-Warray-bounds]
6 | n = *(&n - 6);
| ~~^~~~~~~~~~~
Bob.cpp:4:6: note: while referencing 'bob::n'
4 | int n, m, *a, *b;
| ^
Bob.cpp:7:5: warning: array subscript -7 is outside array bounds of 'int [1]' [-Warray-bounds]
7 | m = *(&n - 7);
| ~~^~~~~~~~~~~
Bob.cpp:4:6: note: while referencing 'bob::n'
4 | int n, m, *a, *b;
| ^
Bob.cpp:8:13: warning: array subscript -9 is outside array bounds of 'int [1]' [-Warray-bounds]
8 | a = (int*)*(&n - 9);
| ^~~~~~~~~
Bob.cpp:4:6: note: while referencing 'bob::n'
4 | int n, m, *a, *b;
| ^
Bob.cpp:9:13: warning: array subscript -11 is outside array bounds of 'int [1]' [-Warray-bounds]
9 | b = (int*)*(&n - 11);
| ^~~~~~~~~~
Bob.cpp:4:6: note: while referencing 'bob::n'
4 | int n, m, *a, *b;
| ^