lkml.org 
[lkml]   [2022]   [Sep]   [27]   [last100]   RSS Feed
Views: [wrap][no wrap]   [headers]  [forward] 
 
Messages in this thread
/
From
SubjectRE: [PATCH v2] x86/fpu: use _Alignof to avoid UB in TYPE_ALIGN
Date
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

\
 
 \ /
  Last update: 2022-09-27 19:09    [W:0.107 / U:0.324 seconds]
©2003-2020 Jasper Spaans|hosted at Digital Ocean and TransIP|Read the blog|Advertise on this site