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.