https://gcc.gnu.org/bugzilla/show_bug.cgi?id=18487
--- Comment #29 from Daniel Berlin ---
Let me try to explain a different way:
The only functions GCC can warn about are those that don’t need the
attributes in the first place. The way any warning would work is to detect
whether it is pure/const,
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=18487
--- Comment #25 from Daniel Berlin ---
This seems like a bad idea, and is impossible in general.
The whole point of the attributes is to tell the compiler things are pure/const
in cases it can't already prove.
It can already prove a lot, and do