Re: Deferencing type-punned pointers, and how to stop gcc giving youa warning
- From: terra gnome org (Morten Welinder)
- To: gtk-devel-list gnome org
- Cc: csherlock optusnet com au
- Subject: Re: Deferencing type-punned pointers, and how to stop gcc giving youa warning
- Date: Mon, 26 Apr 2004 17:16:14 -0400 (EDT)
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.
] [Thread Prev