[Bug c/88088] -Wtrampolines should be enabled by -Wall (or -Wextra)

mark at gcc dot gnu.org gcc-bugzilla@gcc.gnu.org
Mon Nov 19 19:16:00 GMT 2018


https://gcc.gnu.org/bugzilla/show_bug.cgi?id=88088

--- Comment #2 from Mark Wielaard <mark at gcc dot gnu.org> ---
(In reply to Segher Boessenkool from comment #1)
> This also would warn for targets where it is not an issue at all (where
> trampolines are just data, or where the stack is executable anyway, or where
> there is no such "executable" concept at all, for example).

Do you have an example where -Wtrampolines warns unnecessarily?

I might be reading the code wrong, but the trampolines warning is guarded by
on_stack and targetm.calls.custom_function_descriptors != 0. So I believe it
wouldn't warn in case the trampoline is generated on the heap or if the target
uses descriptors for nested functions (which eliminates the need for
trampolines that reside on the stack and require it to be made executable).


More information about the Gcc-bugs mailing list