On Wed, Aug 30, 2023 at 05:06:57PM +0800, Xi Ruoyao via Gcc-patches wrote: > On Tue, 2023-08-29 at 15:42 -0400, Marek Polacek via Gcc-patches wrote: > > + if (UNLIKELY (flag_hardened) > > + && (opt->code == OPT_D || opt->code == OPT_U)) > > + { > > + if (!fortify_seen_p) > > + fortify_seen_p = !strncmp (opt->arg, "_FORTIFY_SOURCE", 15); > > + if (!cxx_assert_seen_p) > > + cxx_assert_seen_p = !strcmp (opt->arg, > > "_GLIBCXX_ASSERTIONS"); > > It looks like there is some minor logic issue here: the first strncmp > will mistakenly match "-D_FORTIFY_SOURCE_FAKE", and the second strcmp > will not match "-D_GLIBCXX_ASSERTIONS=1".
Thanks, you're right. Should be fixed in https://gcc.gnu.org/pipermail/gcc-patches/2023-September/630550.html Marek