[Bug c/51971] unclear/unverified restrictions on attribute((const|pure))

2021-04-19 Thread davidfromonline at gmail dot com via Gcc-bugs
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=51971 --- Comment #5 from David Stone --- After compiling this code ``` struct s { s(); }; s::s() {} s g() { return s(); } ``` with `-O3 -Wsuggest-attribute=pure -Wsuggest-attribute=const` I get the output ``` : In function 's g()

[Bug c/51971] unclear/unverified restrictions on attribute((const|pure))

2021-04-17 Thread davidfromonline at gmail dot com via Gcc-bugs
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=51971 David Stone changed: What|Removed |Added CC||davidfromonline at gmail dot com --- Comm

[Bug c/51971] unclear/unverified restrictions on attribute((const|pure))

2020-10-10 Thread egallager at gcc dot gnu.org via Gcc-bugs
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=51971 Eric Gallager changed: What|Removed |Added CC||m...@nieper-wisskirchen.de --- Comment #

[Bug c/51971] unclear/unverified restrictions on attribute((const|pure))

2017-07-26 Thread egallager at gcc dot gnu.org
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=51971 Eric Gallager changed: What|Removed |Added Keywords||documentation CC|

[Bug c/51971] unclear/unverified restrictions on attribute((const|pure))

2012-01-24 Thread rguenth at gcc dot gnu.org
http://gcc.gnu.org/bugzilla/show_bug.cgi?id=51971 --- Comment #1 from Richard Guenther 2012-01-24 13:01:03 UTC --- GCC explicitely allows you to use const/pure to enable CSE even if it would not consider the function const/pure itself (thus, if you are happy to loose a second assert (), or a deb