Huge thanks to our Platinum Members Endace and LiveAction,
and our Silver Member Veeam, for supporting the Wireshark Foundation and project.

Wireshark-dev: Re: [Wireshark-dev] packet-ieee802154.c compilation error

From: Jaap Keuter <jaap.keuter@xxxxxxxxx>
Date: Wed, 03 Sep 2008 20:57:13 +0200
Hello Guy,

Thanks for the extensive analysis of this issue. You come to the same conclusion as I. ^ is converted into/handled as ~ which is not the same in this case. I'll see if I can create a test program showing this issue to file with the report.

Thanx,
Jaap

Guy Harris wrote:
On Sep 2, 2008, at 2:04 PM, Maynard, Chris wrote:

Jaap,
I assume this is the line it's complaining about?:

fcs_ok = (fcs == ieee802154_crc_tvb(tvb,
tvb_reported_length(tvb)-IEEE802154_FCS_LEN));


So I think this is a GCC bug; you might want to file a bug either against Debian or against GCC and note that "{unsigned short} ^ 0xFFFF" is not equivalent to "~{unsigned short}" in an "int longer than short" environment (the first of those doesn't flip the upper N bits of the promoted "unsigned short", the second of those does).