This is the mail archive of the gcc-bugs@gcc.gnu.org mailing list for the GCC project.


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]
Other format: [Raw text]

[Bug c/25173] gcc outputs unnecessary warnings



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


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]