This is the mail archive of the
gcc@gcc.gnu.org
mailing list for the GCC project.
GCC feature req: warn when bitops exceed type size (was: conntrack untracked match is broken)
- From: Jan Engelhardt <jengelh at medozas dot de>
- To: gcc at gnu dot org
- Date: Mon, 29 Jun 2009 15:10:18 +0200 (CEST)
- Subject: GCC feature req: warn when bitops exceed type size (was: conntrack untracked match is broken)
Hi gcc list,
I am forwarding below's bugreport here(*), to implicitly make aware
of a feature that I deem important to have in a future gcc.
(*) should have posted to bugzilla instead? Don't feel like setting
up a bugmenot tho..
---------- Forwarded message ----------
Date: Mon, 29 Jun 2009 14:34:10
From: Patrick McHardy
To: Jan Engelhardt
Cc: Netfilter Developer Mailing List <netfilter-devel@vger.kernel.org>,
Philip Craig
Subject: Re: conntrack untracked match is broken (kernel patch)
>On Monday 2009-06-22 08:31, Philip Craig wrote:
>>The problem is that state_mask in 'struct xt_conntrack_mtinfo1' is
>>only 8 bit, but XT_CONNTRACK_STATE_UNTRACKED == 256.
>>Unfortunately, gcc doesn't warn about this for '|=', only for '='.
[i.e. uint8_t x = 0; x |= 256; ]
>
>I smell a gcc-missing-feature there.