--- Comment #5 from pinskia at gcc dot gnu dot org 2005-11-30 03:08 ---
(In reply to comment #4)
> Don't you think that forcing people to cast pointers is much much more
> dangerous than allowing simple equivalence of pointers when they aren't even
> being derefenced?
No. Read my comme
--- Comment #4 from jw203198 at hotmail dot com 2005-11-30 02:52 ---
Don't you think that forcing people to cast pointers is much much more
dangerous than allowing simple equivalence of pointers when they aren't even
being derefenced?
What about this:
struct x *f() { return ptr;}
--- Comment #3 from pinskia at gcc dot gnu dot org 2005-11-30 02:13 ---
(In reply to comment #2)
> But surely that example isn't evidence of a problem.
yes it is, since it is invalid code, I repeat it is invalid code. How many
more times do I need to repeat that?
Just add a cast to ge
--- Comment #2 from jw203198 at hotmail dot com 2005-11-30 02:07 ---
But surely that example isn't evidence of a problem.
Because if somebody codes:
int *p = f();
does it really matter what the signedness of f()'s return value is?
The caller has a pointer which is most definitely
--- Comment #1 from pinskia at gcc dot gnu dot org 2005-11-30 01:36 ---
Because the code is really invalid C.
that is:
int *a;
unsigned int *f(void)
{
return a;
}
Is invalid C. We used to just output a warning with -pedantic but now the
warning is always on unless you add -Wno-pointe