On Mon, Jan 30, 2023 at 6:12 PM Segher Boessenkool <segher@xxxxxxxxxxxxxxxxxxx> wrote: > > The manual says > The effectiveness of some warnings depends on optimizations also being > enabled. For example '-Wsuggest-final-types' is more effective with > link-time optimization and some instances of other warnings may not be > issued at all unless optimization is enabled. While optimization in > general improves the efficacy of control and data flow sensitive > warnings, in some cases it may also cause false positives. > > > Flags like -O1 do more than just enabling some other flags. > Thank you! Another point of clarification; how is it that -foptimize-strlen is necessary for -Wstringop-truncation to work? Is that noted somewhere?