From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: by sourceware.org (Postfix, from userid 48) id 4C3603848592; Sat, 4 Jun 2022 08:26:28 +0000 (GMT) DKIM-Filter: OpenDKIM Filter v2.11.0 sourceware.org 4C3603848592 From: "eyalroz1 at gmx dot com" To: gcc-bugs@gcc.gnu.org Subject: [Bug libstdc++/105845] New: Provide a name mangling facility Date: Sat, 04 Jun 2022 08:26:28 +0000 X-Bugzilla-Reason: CC X-Bugzilla-Type: new X-Bugzilla-Watch-Reason: None X-Bugzilla-Product: gcc X-Bugzilla-Component: libstdc++ X-Bugzilla-Version: unknown X-Bugzilla-Keywords: X-Bugzilla-Severity: normal X-Bugzilla-Who: eyalroz1 at gmx dot com 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 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: Sat, 04 Jun 2022 08:26:28 -0000 https://gcc.gnu.org/bugzilla/show_bug.cgi?id=3D105845 Bug ID: 105845 Summary: Provide a name mangling facility Product: gcc Version: unknown Status: UNCONFIRMED Severity: normal Priority: P3 Component: libstdc++ Assignee: unassigned at gcc dot gnu.org Reporter: eyalroz1 at gmx dot com Target Milestone: --- GCC, obviously, produces mangled names for (static-storage-duration) variab= les and functions when it produces object files. However, it does not expose th= is functionality to programs, i.e. it doesn't let a C++ program obtain the man= gled name of a function or variable. I'm asking that it does offer that functionality. The specifics would proba= bly involve some bikeshed, but for example, it could be something like this: * In the `abi::` namespace like `__cxa_demangle()`. * One variant of the function would mangle a string * Another variant of the function would mangle a C++ variable or function (= and the mangling function would be templated).=