This is the mail archive of the gcc-bugs@gcc.gnu.org mailing list for the GCC project.


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]
Other format: [Raw text]

[Bug tree-optimization/18487] Warnings for pure and const functions that are not actually pure or const


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.


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]