[Bug c++/32984] add checking for array new & delete

2007-08-09 Thread dcb314 at hotmail dot com
--- Comment #9 from dcb314 at hotmail dot com 2007-08-09 16:03 --- (In reply to comment #8) > I suggest taking a technique from the STL and using an auto_array class In practice, I find both STL and Boost are rarely used. Such advanced tools are fine for experienced C++ programmers. F

[Bug c++/32984] add checking for array new & delete

2007-08-08 Thread fang at csl dot cornell dot edu
--- Comment #8 from fang at csl dot cornell dot edu 2007-08-09 02:54 --- Please forgive a wee bit more noise on this matter: (Yes, I know this is resolved invalid) If you really insist on using a pointer instead of a valarray or vector, I suggest taking a technique from the STL and usi

[Bug c++/32984] add checking for array new & delete

2007-08-06 Thread dcb314 at hotmail dot com
--- Comment #7 from dcb314 at hotmail dot com 2007-08-06 16:06 --- (In reply to comment #6) > This is one which you need huge dataflow analysis Doubtful. Yes/No/Don't know flag on each pointer data member of a class would be some of it. > and whole program to detect this problem. I'd

[Bug c++/32984] add checking for array new & delete

2007-08-05 Thread pinskia at gcc dot gnu dot org
--- Comment #6 from pinskia at gcc dot gnu dot org 2007-08-05 19:37 --- This is not the business of a compiler to detect all and every programming mismatch. It can detect some but not all. This is one which you need huge dataflow analysis and whole program to detect this problem. Thi

[Bug c++/32984] add checking for array new & delete

2007-08-04 Thread sebor at roguewave dot com
--- Comment #5 from sebor at roguewave dot com 2007-08-05 00:31 --- There are third party tools that track these types of problems. Some of them have started to make their way into compilers. For example, the HP static analysis tool called Code Adviser is integrated into the HP aCC compi

[Bug c++/32984] add checking for array new & delete

2007-08-04 Thread gdr at cs dot tamu dot edu
--- Comment #4 from gdr at cs dot tamu dot edu 2007-08-04 22:09 --- Subject: Re: add checking for array new & delete "dcb314 at hotmail dot com" <[EMAIL PROTECTED]> writes: | (In reply to comment #1) | > Special, dedicated tools exist for that task. | | Would you be willing to name

[Bug c++/32984] add checking for array new & delete

2007-08-04 Thread gdr at cs dot tamu dot edu
--- Comment #3 from gdr at cs dot tamu dot edu 2007-08-04 22:06 --- Subject: Re: add checking for array new & delete "dcb314 at hotmail dot com" <[EMAIL PROTECTED]> writes: | The compiler can generate a whole bunch of warnings | already. Which fall in different mindset that the one y

Re: [Bug c++/32984] add checking for array new & delete

2007-08-04 Thread Gabriel Dos Reis
"dcb314 at hotmail dot com" <[EMAIL PROTECTED]> writes: | The compiler can generate a whole bunch of warnings | already. Which fall in different mindset that the one you would like. -- Gaby

[Bug c++/32984] add checking for array new & delete

2007-08-04 Thread dcb314 at hotmail dot com
--- Comment #2 from dcb314 at hotmail dot com 2007-08-04 19:52 --- (In reply to comment #1) > Special, dedicated tools exist for that task. Would you be willing to name three of them ? > The above should not be the business of the *compiler*. Why not ? The compiler can generate a w

[Bug c++/32984] add checking for array new & delete

2007-08-04 Thread gdr at cs dot tamu dot edu
--- Comment #1 from gdr at cs dot tamu dot edu 2007-08-04 13:01 --- Subject: Re: New: add checking for array new & delete "dcb314 at hotmail dot com" <[EMAIL PROTECTED]> writes: | Given the following C++ code | | class K | { | public: | void f(); | void g(); | | pri