From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: by sourceware.org (Postfix, from userid 48) id 2D5993857835; Mon, 24 May 2021 02:22:55 +0000 (GMT) DKIM-Filter: OpenDKIM Filter v2.11.0 sourceware.org 2D5993857835 From: "eggert at gnu dot org" To: gcc-bugs@gcc.gnu.org Subject: [Bug other/100735] New: -fno-trampolines doc wrongly implies it affects C, C++ etc. Date: Mon, 24 May 2021 02:22:54 +0000 X-Bugzilla-Reason: CC X-Bugzilla-Type: new X-Bugzilla-Watch-Reason: None X-Bugzilla-Product: gcc X-Bugzilla-Component: other X-Bugzilla-Version: 11.1.0 X-Bugzilla-Keywords: X-Bugzilla-Severity: normal X-Bugzilla-Who: eggert at gnu dot org X-Bugzilla-Status: UNCONFIRMED X-Bugzilla-Resolution: X-Bugzilla-Priority: P3 X-Bugzilla-Assigned-To: unassigned at gcc dot gnu.org X-Bugzilla-Target-Milestone: --- X-Bugzilla-Flags: X-Bugzilla-Changed-Fields: bug_id short_desc product version bug_status bug_severity priority component assigned_to reporter target_milestone attachments.created Message-ID: Content-Type: text/plain; charset="UTF-8" Content-Transfer-Encoding: quoted-printable X-Bugzilla-URL: http://gcc.gnu.org/bugzilla/ Auto-Submitted: auto-generated MIME-Version: 1.0 X-BeenThere: gcc-bugs@gcc.gnu.org X-Mailman-Version: 2.1.29 Precedence: list List-Id: Gcc-bugs mailing list List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Mon, 24 May 2021 02:22:55 -0000 https://gcc.gnu.org/bugzilla/show_bug.cgi?id=3D100735 Bug ID: 100735 Summary: -fno-trampolines doc wrongly implies it affects C, C++ etc. Product: gcc Version: 11.1.0 Status: UNCONFIRMED Severity: normal Priority: P3 Component: other Assignee: unassigned at gcc dot gnu.org Reporter: eggert at gnu dot org Target Milestone: --- Created attachment 50859 --> https://gcc.gnu.org/bugzilla/attachment.cgi?id=3D50859&action=3Dedit doc patch for -fno-trampolines confusion The GCC manual's documentation of -fno-trampolines was apparently written f= rom an Ada point of view. However, when I read it I understandably mistook it to say that -fno-trampolines also works for C, C++, etc. It doesn't: it is silently ignored for these languages, and I assume for any language other t= han Ada. This confusion caused me to go in the wrong direction in a Gnulib dicussion= , as I mistakenly thought that entire C apps with nested functions could be comp= iled with -fno-trampolines and then use nested C function in stack overflow hand= lers where the alternate stack is allocated via malloc. I was wrong, as this won= 't work on common platforms like x86-64 where malloc yields non-executable storage. A proposed fix for the GCC manual is attached.=