[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Message-Id: <20220927170702.209578-1-me@inclyc.cn>
Date: Wed, 28 Sep 2022 01:07:02 +0800
From: YingChi Long <me@...lyc.cn>
To: me@...lyc.cn
Cc: bp@...en8.de, chang.seok.bae@...el.com,
dave.hansen@...ux.intel.com, david.laight@...lab.com,
hpa@...or.com, linux-kernel@...r.kernel.org, mingo@...hat.com,
ndesaulniers@...gle.com, pbonzini@...hat.com, tglx@...utronix.de,
x86@...nel.org
Subject: RE: [PATCH v2] x86/fpu: use _Alignof to avoid UB in TYPE_ALIGN
In LLVM Phab we have discussed difference between using offsetof and _Alignof.
> Technically there's no requirement that they return the same value (the
> structure could insert arbitrary padding, including no padding), so it's
> theoretically possible they return different values. But I can't think of a
> situation in which you'd get a different answer from `TYPE_ALIGN` as you
> would get from `_Alignof`.
Link: https://reviews.llvm.org/D133574#3815253
Powered by blists - more mailing lists