On Mon, 30 Jan 2023 at 22:36, Patrick Herbst via Gcc-help <gcc-help@xxxxxxxxxxx> wrote: > but i cannot get it to display if not using optimization. I've even > tried manually adding all the -f options documented for -O1 to > understand what other flags might be needed to generate the warning. > I've had no success. Because you can't enable optimization with -f options. See https://gcc.gnu.org/wiki/FAQ#optimization-options If you don't use one of the -Ox optimization options then **no** optimization passes run at all, so enabling and disabling individual optimization passes with -fxxx options has no effect, They're just skipped completely.