http://llvm.org/bugs/show_bug.cgi?id=10809
Summary: volatile read discarded
Product: clang
Version: trunk
Platform: PC
OS/Version: Linux
Status: NEW
Severity: normal
Priority: P
Component: LLVM Codegen
AssignedTo: [email protected]
ReportedBy: [email protected]
CC: [email protected]
Clang discards the volatile read in this testcase:
extern int could_be_volatile;
void foo() {
*static_cast<volatile int*>(&could_be_volatile);
}
C++11 [expr]/5 describes this as a discarded-value-expression and explains that
they are to be evaluated. The volatile operation is whitelisted as undergoing
lvalue-to-rvalue conversion because it is an indirection of a volatile typed
object.
--
Configure bugmail: http://llvm.org/bugs/userprefs.cgi?tab=email
------- You are receiving this mail because: -------
You are on the CC list for the bug.
_______________________________________________
LLVMbugs mailing list
[email protected]
http://lists.cs.uiuc.edu/mailman/listinfo/llvmbugs