https://bugs.llvm.org/show_bug.cgi?id=49604
Bug ID: 49604
Summary: Implement the -Winvalid-memory-model
Product: clang
Version: unspecified
Hardware: PC
OS: Linux
Status: NEW
Severity: enhancement
Priority: P
Component: C
Assignee: [email protected]
Reporter: [email protected]
CC: [email protected], [email protected],
[email protected], [email protected],
[email protected]
C/C++ memory model is hard and people do a lot of errors with it. A warning
from compiler could be very useful for cases when particular memory order
should not be used with particular atomic operation. Foe example
* store operations and memory_order_acquire or memory_order_acq_rel
* load operations and memory_order_release or memory_order_acq_rel
* CAS and memory_order_release or memory_order_acq_rel
Some compilers already implement such warning with -Winvalid-memory-model flag.
Godbolt Playground: https://godbolt.org/z/79bf19
GCC related tikets: https://gcc.gnu.org/bugzilla/show_bug.cgi?id=69104 and
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=99612
--
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