Re: Deferencing type-punned pointers, and how to stop gcc giving youa warning



Glib and GTK+ violate the C standards in many different ways.  It's
probably not useful at this point to expect compliance.

For example, I believe that are quite a few places that will be
unhappy if a void* cannot hold a function type pointer.  They
are, after all, not required to even have the same size.

Consequently I believe that these warnings should be eliminated
using as few casts as possible.  Casts are truly a maintenance
nightmare.  If there is a way to simply make gcc shut up, then
I think that is the way to go.

Morten



[Date Prev][Date Next]   [Thread Prev][Thread Next]   [Thread Index] [Date Index] [Author Index]