https://gcc.gnu.org/bugzilla/show_bug.cgi?id=103176
Martin Sebor <msebor at gcc dot gnu.org> changed: What |Removed |Added ---------------------------------------------------------------------------- Status|UNCONFIRMED |WAITING Last reconfirmed| |2021-11-10 Ever confirmed|0 |1 CC| |msebor at gcc dot gnu.org --- Comment #2 from Martin Sebor <msebor at gcc dot gnu.org> --- Historically, flow-dependent warnings in GCC have relied on optimization. Some work without it and just yield better results with it (e.g., -Wuninitialized), others require it and won't do anything otherwise (e.g., -Warray-bounds). This is starting to change so that more warnings are useful even without optimization, but only slowly, and to a limited extent (e.g., to see across function call boundaries requires inlining and likely will for the foreseeable future). Some warnings like -Wstringop-overflow are a hybrid: some instances are issued only during the strlen optimization, others at other times. None of these warnings are free of false positives (in fact, none ever are). Some are unavoidable due to limits inherent in computing, some due to design trade-offs, others are incidental (i.e., bugs). To tell where the instances in comment #0 fall we ask for a test case, or at least the translation unit, so that we can easily reproduce and analyze them (see https://gcc.gnu.org/bugs/). I set the status to WAITING until you have provided one.