On Tue, 2020-01-14 at 23:09 +0100, Jakub Jelinek wrote: > On Tue, Jan 14, 2020 at 03:02:01PM -0700, Jeff Law wrote: > > Bootstrapped and regression tested on x86_64. Verified STACK_DIRECTION > > is correct via hand inspection. > > > > OK for the trunk? > > Wouldn't that fail due to warnings if compiled e.g. by gcc that doesn't > support noclone attribute? > Can't we e.g. instead do > int (*volatile fn) (); > fn = find_stack_direction; > return fn (); > instead of > return find_stack_direction (); > when performing the recursive call? > Though, at least current trunk emits tons of warnings on it already, so > maybe it must ignore warnings already. I think the safe thing to do is make it conditional on GCC and the versions that support noclone, noinline.
jeff >