https://gcc.gnu.org/bugzilla/show_bug.cgi?id=61579
Martin Sebor <msebor at gcc dot gnu.org> changed: What |Removed |Added ---------------------------------------------------------------------------- CC| |msebor at gcc dot gnu.org See Also| |https://gcc.gnu.org/bugzill | |a/show_bug.cgi?id=90404 --- Comment #9 from Martin Sebor <msebor at gcc dot gnu.org> --- pr90404 is somewhat related to this: it requests a new warning option to flag attempts to modify a const object of any type/kind. In my prototype implementation of it that I hope to submit for GCC 11 I call the option -Wwrite-const. It's implemented in the middle end so it detects all such attempts, including for instance things like '*strchr("x", 'x') = 0', and avoids triggering on provably unreachable code. It's just as capable as other late warnings, but, of course, also subject to just as many false positives and negatives as they are.