This is the mail archive of the
gcc-bugs@gcc.gnu.org
mailing list for the GCC project.
[Bug tree-optimization/18487] Warnings for pure and const functions that are not actually pure or const
- From: "jakub at gcc dot gnu.org" <gcc-bugzilla at gcc dot gnu dot org>
- To: gcc-bugs at gcc dot gnu dot org
- Date: Thu, 22 Jan 2015 07:06:33 +0000
- Subject: [Bug tree-optimization/18487] Warnings for pure and const functions that are not actually pure or const
- Auto-submitted: auto-generated
- References: <bug-18487-4 at http dot gcc dot gnu dot org/bugzilla/>
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=18487
Jakub Jelinek <jakub at gcc dot gnu.org> changed:
What |Removed |Added
----------------------------------------------------------------------------
CC| |jakub at gcc dot gnu.org
--- Comment #11 from Jakub Jelinek <jakub at gcc dot gnu.org> ---
It would have to be a warning, and would necessarily not catch many things,
e.g. if you use inline asm, it is hard to find out if it is non-pure, as has
been mentioned earlier, dead code or possible dead code should not be warned
about, and if you call other functions, even if they aren't declared pure, it
might be that they don't write anything with the given arguments or arranged
through other means.