http://gcc.gnu.org/bugzilla/show_bug.cgi?id=60517
--- Comment #13 from Marc Glisse <glisse at gcc dot gnu.org> --- (In reply to Manuel López-Ibáñez from comment #12) > Why do you want to remove the clobber? I am in the DSE pass, so removing the clobber as a dead store is the easiest thing to do ;-) Ok, it might not be such a good idea. > I understood your idea to avoid duplicated warnings was to add > __builtin_unreachable and replace the value. adding __builtin_unreachable seems doable. I am not sure what to replace the value with though, as the variable could have any type. Note that I also posted: http://gcc.gnu.org/ml/gcc-patches/2014-04/msg00269.html (hmm, OPT_Wreturn_local_addr is a C/C++ FE flag, I should move it or pick a different one) where I do replace the pointer by zero as you suggested. I am not adding __builtin_unreachable, because if nothing uses the return value, I am not sure it would be right to break the code. > Could be possible to have a special var/value that is marked as artificial > such that the warning code never warns for statements containing this > variable? We already have DECL_ARTIFICIAL in the FE but I am not sure > whether that survives to the middle-end. There is probably some unused bit somewhere...