1 template<typename _Tp> 2 class auto_ptr { 3 private: 4 _Tp* _M_ptr; 5 public: throw()6 auto_ptr(_Tp* __p = 0) throw() : _M_ptr(__p) { } ~auto_ptr()7 ~auto_ptr() { delete _M_ptr; } 8 }; 9 cause_div_by_zero_in_header(int in)10void cause_div_by_zero_in_header(int in) { 11 int h = 0; 12 h = in/h; 13 h++; 14 } 15 do_something(int in)16void do_something (int in) { 17 in++; 18 in++; 19 } 20 cause_div_by_zero_in_header2(int in)21void 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 cause_div_by_zero_in_header3(int in)29void 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 cause_div_by_zero_in_header4(int in)37void 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