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()
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=51971
David Stone changed:
What|Removed |Added
CC||davidfromonline at gmail dot
com
--- Comm
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=51971
Eric Gallager changed:
What|Removed |Added
CC||m...@nieper-wisskirchen.de
--- Comment #
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=51971
Eric Gallager changed:
What|Removed |Added
Keywords||documentation
CC|
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