Summary: | missing warning on pure function with side-effects | ||
---|---|---|---|
Product: | gcc | Reporter: | Martin Sebor <msebor> |
Component: | c | Assignee: | Not yet assigned to anyone <unassigned> |
Status: | RESOLVED DUPLICATE | ||
Severity: | enhancement | CC: | ed, gcc-bugs, msebor |
Priority: | P3 | Keywords: | diagnostic |
Version: | 4.3.0 | ||
Target Milestone: | --- | ||
Host: | Target: | ||
Build: | Known to work: | ||
Known to fail: | Last reconfirmed: | 2008-08-08 20:53:56 |
Description
Martin Sebor
2008-08-08 19:44:13 UTC
Similarly, functions declared with the const attribute such as f1() in the test case below that violate the compiler's assumptions should be diagnosed: $ cat -n t.C && g++ -c -O2 -Wall -W t.C 1 extern int i; 2 int f1 () __attribute ((const)); 3 int f1 () 4 { 5 return i; 6 } 7 Confirmed. |