http://llvm.org/bugs/show_bug.cgi?id=22286
Bug ID: 22286
Summary: Provide strict check for pure attribute
Product: clang
Version: trunk
Hardware: All
OS: All
Status: NEW
Severity: enhancement
Priority: P
Component: Static Analyzer
Assignee: [email protected]
Reporter: [email protected]
CC: [email protected]
Classification: Unclassified
Currently an impure function can be attributed as 'pure' and still compile
correctly with no warnings or errors. i.e.:
// BEGIN CODE
int global = 0;
__attribute__((pure))
void foo() {
global += 1; // this obviously violates the pure attribute
}
int main() {
foo();
}
// END CODE
It would be nice to be able to enable some sort of warning or error for code
like this.
--
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