[asterisk-dev] [asterisk-commits] kpfleming: trunk r77820 - /trunk/channels/chan_sip.c

Kevin P. Fleming kpfleming at digium.com
Wed Aug 1 10:07:04 CDT 2007


Luigi Rizzo wrote:

> do you know why is that ? maybe function pointers are still 32-bits ?
> In that case maybe the cast to void ** should rather be to
> (some_function **) (which in C is probably something insane to
> write... hence the memset is certainly preferable!)

No, function pointers (all pointers) are 64 bits.

The compiler complained about dereferencing the cast pointer would break
strict aliasing rules, something that GCC 4.x is very aware of (and
previous versions were not). I don't completely understand why it cares
(I've never spent the time to look into it), but it seemed simpler to
just work around it.

-- 
Kevin P. Fleming
Director of Software Technologies
Digium, Inc. - "The Genuine Asterisk Experience" (TM)



More information about the asterisk-dev mailing list