public inbox for gcc-bugs@sourceware.org
help / color / mirror / Atom feed
* [Bug c++/111471] New: Incorrect NTTP printing in the error messages
@ 2023-09-19  7:33 mateusz.pusz at gmail dot com
  2023-09-19 16:17 ` [Bug c++/111471] " ppalka at gcc dot gnu.org
                   ` (3 more replies)
  0 siblings, 4 replies; 5+ messages in thread
From: mateusz.pusz at gmail dot com @ 2023-09-19  7:33 UTC (permalink / raw)
  To: gcc-bugs

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

            Bug ID: 111471
           Summary: Incorrect NTTP printing in the error messages
           Product: gcc
           Version: 14.0
            Status: UNCONFIRMED
          Severity: normal
          Priority: P3
         Component: c++
          Assignee: unassigned at gcc dot gnu.org
          Reporter: mateusz.pusz at gmail dot com
  Target Milestone: ---

Please see the following example https://godbolt.org/z/qajTKdnGq:

There are many similar issues:

```
required for the satisfaction of 'ReferenceOf<typename
std::remove_const<decltype (Q::reference)>::type, V>' [with Q =
mp_units::quantity<{}, double>; V = _ZTAXtlN8mp_units3isq5speedEEE]
```

The `{}` part above does not help at all and should print the actual type of
the NTTP somewhere. `_ZTAXtlN8mp_units3isq5speedEEE` should be properly
demangled. 

```
note: the expression 'implicitly_convertible({}, QS) [with T =
mp_units::kind_of_<{}>; QS = _ZTAXtlN8mp_units3isq5speedEEE]' evaluated to
'false'
```

Again, lack of demangling and mysterious `{}`.

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

* [Bug c++/111471] Incorrect NTTP printing in the error messages
  2023-09-19  7:33 [Bug c++/111471] New: Incorrect NTTP printing in the error messages mateusz.pusz at gmail dot com
@ 2023-09-19 16:17 ` ppalka at gcc dot gnu.org
  2023-09-20 16:11 ` cvs-commit at gcc dot gnu.org
                   ` (2 subsequent siblings)
  3 siblings, 0 replies; 5+ messages in thread
From: ppalka at gcc dot gnu.org @ 2023-09-19 16:17 UTC (permalink / raw)
  To: gcc-bugs

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

Patrick Palka <ppalka at gcc dot gnu.org> changed:

           What    |Removed                     |Added
----------------------------------------------------------------------------
   Target Milestone|---                         |13.3
           Keywords|                            |diagnostic
   Last reconfirmed|                            |2023-09-19
           Assignee|unassigned at gcc dot gnu.org      |ppalka at gcc dot gnu.org
             Status|UNCONFIRMED                 |ASSIGNED
     Ever confirmed|0                           |1
                 CC|                            |ppalka at gcc dot gnu.org

--- Comment #1 from Patrick Palka <ppalka at gcc dot gnu.org> ---
Confirmed.

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

* [Bug c++/111471] Incorrect NTTP printing in the error messages
  2023-09-19  7:33 [Bug c++/111471] New: Incorrect NTTP printing in the error messages mateusz.pusz at gmail dot com
  2023-09-19 16:17 ` [Bug c++/111471] " ppalka at gcc dot gnu.org
@ 2023-09-20 16:11 ` cvs-commit at gcc dot gnu.org
  2023-09-22 10:32 ` cvs-commit at gcc dot gnu.org
  2024-05-21  9:17 ` jakub at gcc dot gnu.org
  3 siblings, 0 replies; 5+ messages in thread
From: cvs-commit at gcc dot gnu.org @ 2023-09-20 16:11 UTC (permalink / raw)
  To: gcc-bugs

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

--- Comment #2 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:75c4b0cde4835b45350da0a5cd82f1d1a0a7a2f1

commit r14-4178-g75c4b0cde4835b45350da0a5cd82f1d1a0a7a2f1
Author: Patrick Palka <ppalka@redhat.com>
Date:   Wed Sep 20 12:09:36 2023 -0400

    c++: improve class NTTP object pretty printing [PR111471]

    1. Move class NTTP object pretty printing to a more general spot in
       the pretty printer, so that we always print its value instead of
       its (mangled) name even when it appears outside of a template
       argument list.
    2. Print the type of an class NTTP object alongside its CONSTRUCTOR
       value, like dump_expr would have done.
    3. Don't print const VIEW_CONVERT_EXPR wrappers for class NTTPs.

            PR c++/111471

    gcc/cp/ChangeLog:

            * cxx-pretty-print.cc (cxx_pretty_printer::expression)
            <case VAR_DECL>: Handle class NTTP objects by printing
            their type and value.
            <case VIEW_CONVERT_EXPR>: Strip const VIEW_CONVERT_EXPR
            wrappers for class NTTPs.
            (pp_cxx_template_argument_list): Don't handle class NTTP
            objects here.

    gcc/testsuite/ChangeLog:

            * g++.dg/concepts/diagnostic19.C: New test.

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

* [Bug c++/111471] Incorrect NTTP printing in the error messages
  2023-09-19  7:33 [Bug c++/111471] New: Incorrect NTTP printing in the error messages mateusz.pusz at gmail dot com
  2023-09-19 16:17 ` [Bug c++/111471] " ppalka at gcc dot gnu.org
  2023-09-20 16:11 ` cvs-commit at gcc dot gnu.org
@ 2023-09-22 10:32 ` cvs-commit at gcc dot gnu.org
  2024-05-21  9:17 ` jakub at gcc dot gnu.org
  3 siblings, 0 replies; 5+ messages in thread
From: cvs-commit at gcc dot gnu.org @ 2023-09-22 10:32 UTC (permalink / raw)
  To: gcc-bugs

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

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

https://gcc.gnu.org/g:b7d2bb488efbdeab42cf047d92cf0f9acdc1c5ec

commit r13-7830-gb7d2bb488efbdeab42cf047d92cf0f9acdc1c5ec
Author: Patrick Palka <ppalka@redhat.com>
Date:   Wed Sep 20 12:09:36 2023 -0400

    c++: improve class NTTP object pretty printing [PR111471]

    1. Move class NTTP object pretty printing to a more general spot in
       the pretty printer, so that we always print its value instead of
       its (mangled) name even when it appears outside of a template
       argument list.
    2. Print the type of an class NTTP object alongside its CONSTRUCTOR
       value, like dump_expr would have done.
    3. Don't print const VIEW_CONVERT_EXPR wrappers for class NTTPs.

            PR c++/111471

    gcc/cp/ChangeLog:

            * cxx-pretty-print.cc (cxx_pretty_printer::expression)
            <case VAR_DECL>: Handle class NTTP objects by printing
            their type and value.
            <case VIEW_CONVERT_EXPR>: Strip const VIEW_CONVERT_EXPR
            wrappers for class NTTPs.
            (pp_cxx_template_argument_list): Don't handle class NTTP
            objects here.

    gcc/testsuite/ChangeLog:

            * g++.dg/concepts/diagnostic19.C: New test.

    (cherry picked from commit 75c4b0cde4835b45350da0a5cd82f1d1a0a7a2f1)

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

* [Bug c++/111471] Incorrect NTTP printing in the error messages
  2023-09-19  7:33 [Bug c++/111471] New: Incorrect NTTP printing in the error messages mateusz.pusz at gmail dot com
                   ` (2 preceding siblings ...)
  2023-09-22 10:32 ` cvs-commit at gcc dot gnu.org
@ 2024-05-21  9:17 ` jakub at gcc dot gnu.org
  3 siblings, 0 replies; 5+ messages in thread
From: jakub at gcc dot gnu.org @ 2024-05-21  9:17 UTC (permalink / raw)
  To: gcc-bugs

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

Jakub Jelinek <jakub at gcc dot gnu.org> changed:

           What    |Removed                     |Added
----------------------------------------------------------------------------
   Target Milestone|13.3                        |13.4

--- Comment #4 from Jakub Jelinek <jakub at gcc dot gnu.org> ---
GCC 13.3 is being released, retargeting bugs to GCC 13.4.

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

end of thread, other threads:[~2024-05-21  9:18 UTC | newest]

Thread overview: 5+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2023-09-19  7:33 [Bug c++/111471] New: Incorrect NTTP printing in the error messages mateusz.pusz at gmail dot com
2023-09-19 16:17 ` [Bug c++/111471] " ppalka at gcc dot gnu.org
2023-09-20 16:11 ` cvs-commit at gcc dot gnu.org
2023-09-22 10:32 ` cvs-commit at gcc dot gnu.org
2024-05-21  9:17 ` jakub 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).