Re: type-punning warnings with optimizations turned on?



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]