[<prev] [next>] [<thread-prev] [day] [month] [year] [list]
Message-ID: <6759d98f-03fd-672c-e1eb-22ccc37e2b5d@unstable.cc>
Date: Wed, 20 May 2020 23:25:38 +0200
From: Antonio Quartulli <a@...table.cc>
To: David Miller <davem@...emloft.net>
Cc: netdev@...r.kernel.org, cake@...ts.bufferbloat.net, toke@...e.dk,
jhs@...atatu.com, xiyou.wangcong@...il.com, jiri@...nulli.us,
stephen@...workplumber.org
Subject: Re: [PATCH] net/sch_generic.h: use sizeof_member() and get rid of
unused variable
On 20/05/2020 20:17, David Miller wrote:
> From: Antonio Quartulli <a@...table.cc>
> Date: Wed, 20 May 2020 10:39:33 +0200
>
>> I don't think it's BUILD_BUG_ON()'s fault, because qcb->data is passed
>> to sizeof() first.
>>
>> My best guess is that gcc is somewhat optimizing the sizeof(gcb->data)
>> and thus leaving the gcb variable unused.
>
> If you remove the argument from the function but leave the BUILD_BUG_ON()
> calls the same, the compilation will fail.
>
> Any such optimization is therefore unreasonable.
>
> The variable is used otherwise compilation would not fail when you
> remove it right?
You're correct.
I guess this should be reported to gcc then.
Regards,
--
Antonio Quartulli
Powered by blists - more mailing lists