https://gcc.gnu.org/bugzilla/show_bug.cgi?id=116570
--- Comment #5 from Xi Ruoyao <xry111 at gcc dot gnu.org> --- (In reply to uis from comment #4) > I tried even adding restrict keyword and leaf attribute. Why would they make any difference? If do_something_with is a macro the leaf attribute won't invalidate my example. And restrict means nothing here because p is not used to access anything. Contrary to some common misunderstandings, restrict only make a difference when the pointer is used to access a value through it.