--- 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
--- 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
--- 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) {
--- 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