summaryrefslogtreecommitdiff
path: root/include/compiler.h
diff options
context:
space:
mode:
authorH. Peter Anvin (Intel) <hpa@zytor.com>2020-06-30 09:54:01 -0700
committerH. Peter Anvin (Intel) <hpa@zytor.com>2020-06-30 09:54:01 -0700
commitf21b2ba8f3772eb7d1207c214a181516b9d1f4e4 (patch)
treefbd825ab863c64eeb4791155e61b3126e099565c /include/compiler.h
parent14f41b23192e827a01201ac4296861290e221c1f (diff)
downloadnasm-f21b2ba8f3772eb7d1207c214a181516b9d1f4e4.tar.gz
BR 3392687: clang miscompiles offsetin() for uninitialized pointer
The actual pointer value in offsetin() cancels out, but clang still miscompiles offsetin() for an uninitialized pointer, considering the value to be completely undefined. Initialize pointer being passed to offsetin() to make clang happy; both the gcc and clang optimizers discover later in the code that the initialization is unused and removes it from the code. Although technically undefined behavior, this is in my opinion a severe quality of implementation bug in clang, and I will file a bug report accordingly. Reported-by: Jasper Lievisse Adriaanse <r+nasm@jasper.la> Reported-by: David Bohman <debohman@gmail.com> Signed-off-by: H. Peter Anvin (Intel) <hpa@zytor.com>
Diffstat (limited to 'include/compiler.h')
0 files changed, 0 insertions, 0 deletions