https://gcc.gnu.org/bugzilla/show_bug.cgi?id=88088
--- Comment #13 from Mark Wielaard <mark at gcc dot gnu.org> --- (In reply to Segher Boessenkool from comment #12) > Requiring everything on the stack to always be executable, while normally it > is > not, is an issue, sure. > > Requiring the stack to be executable when *everything* is executable > *always*, > is not an issue. I think we are talking past each other. -Wtrampolines warns about putting executable code on the stack, which is a questionable construct (that almost never happens, because it would only happen with specific uses of nested functions where taking the address of such a function is put into an environment that need an executable code trampoline put on on the stack) but that you would like to know about so you can avoid it because it also is a security issue and easy to avoid if you know it is happening, which is why it should be added to -Wall. You seem to argue that -Wtrampolines should warn differently for different targets (or that -Wtrampolines should only be added to -Wall for certain targets, but not others). I am not sure it really should be treated differently, it is a questionable code construct whether or not the stack is already executable or not IMHO. I think it would be helpful if you gave a concrete example where having -Wtrampolines in -Wall would produce the warning for a specific piece of code where you think it shouldn't. Do you have a specific program for a specific target in mind?