https://bugs.llvm.org/show_bug.cgi?id=42620
Bug ID: 42620
Summary: `register` keyword with inline assembly is still
needed
Product: clang
Version: unspecified
Hardware: PC
OS: Linux
Status: NEW
Severity: enhancement
Priority: P
Component: C++17
Assignee: [email protected]
Reporter: [email protected]
CC: [email protected], [email protected],
[email protected], [email protected]
Hi, with C++17 `register` keyword was completely removed with its semantics.
Although, while trying to remove it from code base we faced unexpected warning
that clang produced.
E.g.
int main() {
int r asm ("cx") = 0;
return r;
}
Such code will compile with a warning `ignored asm label 'cx' on automatic
variable [-Werror]`
If we add the word `register` before `int r`, it will compile without any
warning
https://gcc.godbolt.org/z/gxFa6P
I saw tests like this somewhere in test/Sema/asm.c. So my question is -- do we
actually need this keyword before the inline assembly that assigns some
register value?
--
You are receiving this mail because:
You are on the CC list for the bug._______________________________________________
llvm-bugs mailing list
[email protected]
https://lists.llvm.org/cgi-bin/mailman/listinfo/llvm-bugs