Re: type-punning warnings with optimizations turned on?
- From: jcupitt gmail com
- To: "Ernie Wright" <erniew comcast net>
- Cc: gtk-app-devel-list gnome org
- Subject: Re: type-punning warnings with optimizations turned on?
- Date: Fri, 6 Jul 2007 19:28:42 +0100
On 7/6/07, Ernie Wright <erniew comcast net> wrote:
> (now someone will tell me the compiler is correct and casting "int
> *x[]" to "void **" is indeed wrong :-)
This is question 4.9 in the C FAQ:
http://c-faq.com/ptrs/genericpp.html
That's very interesting, thank you. Does that mean that (void **)
((void *) x) fixes the problem correctly? Or do you need a real
intermediate variable?
The list of real machines on which this would be an issue didn't
trouble me greatly :)
http://c-faq.com/null/machexamp.html
John
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]