Messages in this thread | | | Date | Fri, 27 Sep 2019 09:57:00 +0300 | From | Alexey Dobriyan <> | Subject | Re: [GIT PULL] treewide conversion to sizeof_member() for v5.4-rc1 |
| |
On Thu, Sep 26, 2019 at 01:06:01PM -0700, Linus Torvalds wrote: > On Thu, Sep 26, 2019 at 10:33 AM Kees Cook <keescook@chromium.org> wrote: > > > > Please pull this mostly mechanical treewide conversion to the single and > > more accurately named sizeof_member() macro for the end of v5.4-rc1. This > > replaces 3 macros of the same behavior (FIELD_SIZEOF(), SIZEOF_FIELD(), > > and sizeof_field()). The last patch in the series has a script in the > > commit log to do the conversion, if you want to compare the results > > (they remained identical today when I checked). > > Honestly, I'm not sure why "sizeof_field()" wasn't just picked when we > already had it. Making a new macro for the exact same thing seems > somewhat questionable. > > Yes, yes, the C standard calls them "members". Except when it doesn't, > and they are members of a bit type, and it calls them bit-fields.
It does, but neither typeof nor sizeof work on bitfields.
| |