public inbox for gcc-bugs@sourceware.org
help / color / mirror / Atom feed
* [Bug c++/70790] Can't mangle noexcept expressions
       [not found] <bug-70790-4@http.gcc.gnu.org/bugzilla/>
@ 2020-04-08  3:01 ` eric.niebler at gmail dot com
  2020-04-08  4:55 ` lewissbaker.opensource at gmail dot com
                   ` (4 subsequent siblings)
  5 siblings, 0 replies; 6+ messages in thread
From: eric.niebler at gmail dot com @ 2020-04-08  3:01 UTC (permalink / raw)
  To: gcc-bugs

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

--- Comment #1 from Eric Niebler <eric.niebler at gmail dot com> ---
Still present on trunk, four years later.

^ permalink raw reply	[flat|nested] 6+ messages in thread

* [Bug c++/70790] Can't mangle noexcept expressions
       [not found] <bug-70790-4@http.gcc.gnu.org/bugzilla/>
  2020-04-08  3:01 ` [Bug c++/70790] Can't mangle noexcept expressions eric.niebler at gmail dot com
@ 2020-04-08  4:55 ` lewissbaker.opensource at gmail dot com
  2020-04-08  8:14 ` redi at gcc dot gnu.org
                   ` (3 subsequent siblings)
  5 siblings, 0 replies; 6+ messages in thread
From: lewissbaker.opensource at gmail dot com @ 2020-04-08  4:55 UTC (permalink / raw)
  To: gcc-bugs

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

Lewis Baker <lewissbaker.opensource at gmail dot com> changed:

           What    |Removed                     |Added
----------------------------------------------------------------------------
                 CC|                            |lewissbaker.opensource@gmai
                   |                            |l.com

--- Comment #2 from Lewis Baker <lewissbaker.opensource at gmail dot com> ---
The relevant code seems to live in gcc/cp/mangle.c (at least for IA64 mangling)

Does it just need something like the following inserted into the
write_expression() function?

```
  else if (TREE_CODE (expr) == NOEXCEPT_EXPR)
    {
      write_string ("nx");
      write_expression (TREE_OPERAND (expr, 0));
    }
```

The "nx" prefix seems to be what LLVM uses for its Itanium mangling.
See
https://github.com/llvm/llvm-project/blob/13a1504ffb9a9a4f82dc1b60d9e8cbb173c7d030/clang/lib/AST/ItaniumMangle.cpp#L4057

Also see example showing this under clang (working) and gcc (failing):
https://godbolt.org/z/yHrZDm

^ permalink raw reply	[flat|nested] 6+ messages in thread

* [Bug c++/70790] Can't mangle noexcept expressions
       [not found] <bug-70790-4@http.gcc.gnu.org/bugzilla/>
  2020-04-08  3:01 ` [Bug c++/70790] Can't mangle noexcept expressions eric.niebler at gmail dot com
  2020-04-08  4:55 ` lewissbaker.opensource at gmail dot com
@ 2020-04-08  8:14 ` redi at gcc dot gnu.org
  2020-04-08 16:45 ` nathan at gcc dot gnu.org
                   ` (2 subsequent siblings)
  5 siblings, 0 replies; 6+ messages in thread
From: redi at gcc dot gnu.org @ 2020-04-08  8:14 UTC (permalink / raw)
  To: gcc-bugs

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

Jonathan Wakely <redi at gcc dot gnu.org> changed:

           What    |Removed                     |Added
----------------------------------------------------------------------------
     Ever confirmed|0                           |1
   Last reconfirmed|                            |2020-04-08
           Keywords|                            |FIXME
             Status|UNCONFIRMED                 |NEW

^ permalink raw reply	[flat|nested] 6+ messages in thread

* [Bug c++/70790] Can't mangle noexcept expressions
       [not found] <bug-70790-4@http.gcc.gnu.org/bugzilla/>
                   ` (2 preceding siblings ...)
  2020-04-08  8:14 ` redi at gcc dot gnu.org
@ 2020-04-08 16:45 ` nathan at gcc dot gnu.org
  2021-05-04 12:31 ` rguenth at gcc dot gnu.org
  2023-06-03 13:17 ` cvs-commit at gcc dot gnu.org
  5 siblings, 0 replies; 6+ messages in thread
From: nathan at gcc dot gnu.org @ 2020-04-08 16:45 UTC (permalink / raw)
  To: gcc-bugs

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

Nathan Sidwell <nathan at gcc dot gnu.org> changed:

           What    |Removed                     |Added
----------------------------------------------------------------------------
                 CC|                            |nathan at gcc dot gnu.org
           Assignee|unassigned at gcc dot gnu.org      |nathan at gcc dot gnu.org

--- Comment #3 from Nathan Sidwell <nathan at gcc dot gnu.org> ---
... so I don't forget. but not a GCC 10 thing

^ permalink raw reply	[flat|nested] 6+ messages in thread

* [Bug c++/70790] Can't mangle noexcept expressions
       [not found] <bug-70790-4@http.gcc.gnu.org/bugzilla/>
                   ` (3 preceding siblings ...)
  2020-04-08 16:45 ` nathan at gcc dot gnu.org
@ 2021-05-04 12:31 ` rguenth at gcc dot gnu.org
  2023-06-03 13:17 ` cvs-commit at gcc dot gnu.org
  5 siblings, 0 replies; 6+ messages in thread
From: rguenth at gcc dot gnu.org @ 2021-05-04 12:31 UTC (permalink / raw)
  To: gcc-bugs

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

Richard Biener <rguenth at gcc dot gnu.org> changed:

           What    |Removed                     |Added
----------------------------------------------------------------------------
             Status|NEW                         |ASSIGNED

^ permalink raw reply	[flat|nested] 6+ messages in thread

* [Bug c++/70790] Can't mangle noexcept expressions
       [not found] <bug-70790-4@http.gcc.gnu.org/bugzilla/>
                   ` (4 preceding siblings ...)
  2021-05-04 12:31 ` rguenth at gcc dot gnu.org
@ 2023-06-03 13:17 ` cvs-commit at gcc dot gnu.org
  5 siblings, 0 replies; 6+ messages in thread
From: cvs-commit at gcc dot gnu.org @ 2023-06-03 13:17 UTC (permalink / raw)
  To: gcc-bugs

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

--- Comment #4 from CVS Commits <cvs-commit at gcc dot gnu.org> ---
The master branch has been updated by Patrick Palka <ppalka@gcc.gnu.org>:

https://gcc.gnu.org/g:999e617d3121b82921c8031ee695fd036f553f04

commit r14-1516-g999e617d3121b82921c8031ee695fd036f553f04
Author: Patrick Palka <ppalka@redhat.com>
Date:   Sat Jun 3 09:03:27 2023 -0400

    c++: mangle noexcept-expr [PR70790]

    This implements noexcept(expr) mangling and demangling as per the
    Itanium ABI.

            PR c++/70790

    gcc/cp/ChangeLog:

            * mangle.cc (write_expression): Handle NOEXCEPT_EXPR.

    libiberty/ChangeLog:

            * cp-demangle.c (cplus_demangle_operators): Add the noexcept
            operator.
            (d_print_comp_inner) <case DEMANGLE_COMPONENT_UNARY>: Always
            print parens around the operand of noexcept too.
            * testsuite/demangle-expected: Test noexcept operator
            demangling.

    gcc/testsuite/ChangeLog:

            * g++.dg/abi/mangle78.C: New test.

^ permalink raw reply	[flat|nested] 6+ messages in thread

end of thread, other threads:[~2023-06-03 13:17 UTC | newest]

Thread overview: 6+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
     [not found] <bug-70790-4@http.gcc.gnu.org/bugzilla/>
2020-04-08  3:01 ` [Bug c++/70790] Can't mangle noexcept expressions eric.niebler at gmail dot com
2020-04-08  4:55 ` lewissbaker.opensource at gmail dot com
2020-04-08  8:14 ` redi at gcc dot gnu.org
2020-04-08 16:45 ` nathan at gcc dot gnu.org
2021-05-04 12:31 ` rguenth at gcc dot gnu.org
2023-06-03 13:17 ` cvs-commit at gcc dot gnu.org

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).