[Bug c++/29208] C++: Warn about unchecked use of pointers

2006-09-24 Thread sigra at home dot se
--- Comment #4 from sigra at home dot se 2006-09-24 23:57 --- (In reply to comment #3) > some functions require non zero pointers and those should crash instead of > having null pointer checks on them. And using references is not always the > answer as some functions need to be able to b

[Bug c++/29208] C++: Warn about unchecked use of pointers

2006-09-24 Thread pinskia at gcc dot gnu dot org
--- Comment #3 from pinskia at gcc dot gnu dot org 2006-09-24 23:37 --- This would require dataflow to get correct and it is not that useful as some functions require non zero pointers and those should crash instead of having null pointer checks on them. And using references is not alway

[Bug c++/29208] C++: Warn about unchecked use of pointers

2006-09-24 Thread sigra at home dot se
--- Comment #2 from sigra at home dot se 2006-09-24 23:29 --- Sorry, accidentally hit commit too early. Try again: There should be a warning about unchecked use of pointers in C++. For example: void f(T * const x) { x->something... // x might be 0, warn. } void f(T * const x) {

[Bug c++/29208] C++: Warn about unchecked use of pointers

2006-09-24 Thread pinskia at gcc dot gnu dot org
--- Comment #1 from pinskia at gcc dot gnu dot org 2006-09-24 23:29 --- What do you mean by unchecked use of pointers? You example is useless as the function does nothing and even does not compile as T is undeclared. -- pinskia at gcc dot gnu dot org changed: What|Rem