From: David Miller <davem@davemloft.net>
To: a@unstable.cc
Cc: netdev@vger.kernel.org, cake@lists.bufferbloat.net, toke@toke.dk,
jhs@mojatatu.com, xiyou.wangcong@gmail.com, jiri@resnulli.us,
stephen@networkplumber.org
Subject: Re: [Cake] [PATCH] net/sch_generic.h: use sizeof_member() and get rid of unused variable
Date: Wed, 20 May 2020 11:17:17 -0700 (PDT) [thread overview]
Message-ID: <20200520.111717.835995575109387492.davem@davemloft.net> (raw)
In-Reply-To: <2a6a8d4b-cb78-f717-5ede-29a921c5cb05@unstable.cc>
From: Antonio Quartulli <a@unstable.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?
next prev parent reply other threads:[~2020-05-20 18:17 UTC|newest]
Thread overview: 5+ messages / expand[flat|nested] mbox.gz Atom feed top
2020-05-19 9:13 Antonio Quartulli
2020-05-19 22:40 ` David Miller
2020-05-20 8:39 ` Antonio Quartulli
2020-05-20 18:17 ` David Miller [this message]
2020-05-20 21:25 ` Antonio Quartulli
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
List information: https://lists.bufferbloat.net/postorius/lists/cake.lists.bufferbloat.net/
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=20200520.111717.835995575109387492.davem@davemloft.net \
--to=davem@davemloft.net \
--cc=a@unstable.cc \
--cc=cake@lists.bufferbloat.net \
--cc=jhs@mojatatu.com \
--cc=jiri@resnulli.us \
--cc=netdev@vger.kernel.org \
--cc=stephen@networkplumber.org \
--cc=toke@toke.dk \
--cc=xiyou.wangcong@gmail.com \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox