This is the mail archive of the
gcc-bugs@gcc.gnu.org
mailing list for the GCC project.
[Bug c/25173] gcc outputs unnecessary warnings
- From: "jw203198 at hotmail dot com" <gcc-bugzilla at gcc dot gnu dot org>
- To: gcc-bugs at gcc dot gnu dot org
- Date: 30 Nov 2005 02:52:16 -0000
- Subject: [Bug c/25173] gcc outputs unnecessary warnings
- References: <bug-25173-11775@http.gcc.gnu.org/bugzilla/>
- Reply-to: gcc-bugzilla at gcc dot gnu dot org
------- 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;}
unsigned int *x = (unsigned int *)f(); // yikes!!
Now you are opening up a whole can of worms by forcing programmers to expose
themselves to errant casts which will *never* get picked up by a compiler.
How many times must I repeat myself - you are wrong!
--
jw203198 at hotmail dot com changed:
What |Removed |Added
----------------------------------------------------------------------------
Status|RESOLVED |UNCONFIRMED
Resolution|INVALID |
http://gcc.gnu.org/bugzilla/show_bug.cgi?id=25173