[Bug c/37064] missing warning on pure function with side-effects
sebor at roguewave dot com
gcc-bugzilla@gcc.gnu.org
Fri Aug 8 19:49:00 GMT 2008
------- Comment #1 from sebor at roguewave dot com 2008-08-08 19:47 -------
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
--
http://gcc.gnu.org/bugzilla/show_bug.cgi?id=37064
More information about the Gcc-bugs
mailing list