1 | template<typename _Tp> |
2 | class auto_ptr { |
3 | private: |
4 | _Tp* _M_ptr; |
5 | public: |
6 | auto_ptr(_Tp* __p = 0) throw() : _M_ptr(__p) { } |
7 | ~auto_ptr() { delete _M_ptr; } |
8 | }; |
9 | |
10 | void cause_div_by_zero_in_header(int in) { |
11 | int h = 0; |
12 | h = in/h; |
13 | h++; |
14 | } |
15 | |
16 | void do_something (int in) { |
17 | in++; |
18 | in++; |
19 | } |
20 | |
21 | void cause_div_by_zero_in_header2(int in) { |
22 | int h2 = 0; |
23 | h2 = in/h2; |
24 | h2++; |
25 | } |
26 | |
27 | # define CALLS_BUGGY_FUNCTION2 cause_div_by_zero_in_header2(5); |
28 | |
29 | void cause_div_by_zero_in_header3(int in) { |
30 | int h3 = 0; |
31 | h3 = in/h3; |
32 | h3++; |
33 | } |
34 | |
35 | # define CALLS_BUGGY_FUNCTION3 cause_div_by_zero_in_header3(5); |
36 | |
37 | void cause_div_by_zero_in_header4(int in) { |
38 | int h4 = 0; |
39 | h4 = in/h4; |
40 | h4++; |
41 | } |
42 | |
43 | # define TAKE_CALL_AS_ARG(c) c; |
44 | |