------- Comment #7 from manu at gcc dot gnu dot org 2008-10-29 15:46 ------- (In reply to comment #6) > Warning is (reliably) only possible if we can tell if the function call > modifies > the passed storage. This requires some IPA analysis and thus moving the > warning to the middle-end.
I don't want that at all. I wonder how much correct code is written like this against how much incorrect code. However, now I realize that any function call counter += inc(); can trigger this if counter is a global variable. So this is impossible to get right 100% and it is not probably practical to move to the middle-end, since it is very front-end specific. -- manu at gcc dot gnu dot org changed: What |Removed |Added ---------------------------------------------------------------------------- Status|NEW |RESOLVED Resolution| |WONTFIX http://gcc.gnu.org/bugzilla/show_bug.cgi?id=37947