https://llvm.org/bugs/show_bug.cgi?id=31787
Reid Kleckner <r...@google.com> changed: What |Removed |Added ---------------------------------------------------------------------------- Status|NEW |RESOLVED CC| |r...@google.com Resolution|--- |INVALID --- Comment #1 from Reid Kleckner <r...@google.com> --- The warning is correct in our model. This code has undefined behavior. Clang's register variables do not really give you access to the underlying register. They only add implicit input and output operands to every fragment of inline asm in your function. Here's an example showing what clang does: $ echo 'void *f() { register void *got asm("%ebx"); return got; }' | clang -cc1 -x c - -O1 -S .text .def f; .scl 2; .type 32; .endef .globl f .p2align 4, 0x90 f: retq I think there's already a bug somewhere about changing the behavior to be more like GCC, but the consensus is that we won't implement register variables, global or local. -- You are receiving this mail because: You are on the CC list for the bug.
_______________________________________________ llvm-bugs mailing list llvm-bugs@lists.llvm.org http://lists.llvm.org/cgi-bin/mailman/listinfo/llvm-bugs