Thread (7 messages) 7 messages, 4 authors, 2017-01-16

Re: llist code relies on undefined behaviour, upsets llvm/clang

flat view

From: Anton Blanchard <hidden>
Date: 2017-01-16 11:42:59
Also in: lkml

Hi Peter,
Last I checked I couldn't build a x86_64 kernel with llvm. So no, not
something I've ever ran into.

Also, I would argue that this is broken in llvm, the kernel very much
relies on things like this all over the place. Sure, we're way outside
of what the C language spec says, but who bloody cares ;-)
True, but is there anything preventing gcc from implementing this
optimisation in the future? If we are relying on undefined behaviour we
should have a -fno-strict-* option to cover it.
If llvm wants to compile the kernel, it needs to learn the C dialect
the kernel uses.
LLVM has done that before (eg adding -fno-strict-overflow). I don't
think that option covers this case however.

Anton
Keyboard shortcuts
hback out one level
jnext message in thread
kprevious message in thread
ldrill in
Escclose help / fold thread tree
?toggle this help