public inbox for gcc-bugs@sourceware.org
help / color / mirror / Atom feed
* [Bug c++/102651] New: typeid(X**) instantiates X
@ 2021-10-08 15:03 pdimov at gmail dot com
  2021-10-08 18:55 ` [Bug c++/102651] [9/10/11/12 Regression] " pinskia at gcc dot gnu.org
                   ` (9 more replies)
  0 siblings, 10 replies; 11+ messages in thread
From: pdimov at gmail dot com @ 2021-10-08 15:03 UTC (permalink / raw)
  To: gcc-bugs

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

            Bug ID: 102651
           Summary: typeid(X**) instantiates X
           Product: gcc
           Version: 12.0
            Status: UNCONFIRMED
          Severity: normal
          Priority: P3
         Component: c++
          Assignee: unassigned at gcc dot gnu.org
          Reporter: pdimov at gmail dot com
  Target Milestone: ---

Using f.ex. `typeid(std:pair<void, void>**)` tries to instantiate
`std::pair<int, int>` and fails: https://godbolt.org/z/GhbYe3P8j

(One asterisk should be enough, but doesn't work either.)

The example without pair is

```
#include <typeinfo>

template <typename T>
struct S{
    T x;
};

void foo()
{
    typeid( S<void>** );
}
```

https://godbolt.org/z/nG3Kr3Te7

Interestingly, if `S` is incomplete, it works:

```
#include <typeinfo>

template <typename T>
struct S;

void foo()
{
    typeid( S<void>** );
}
```

https://godbolt.org/z/nK8b5n1qn

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

end of thread, other threads:[~2023-07-07 10:41 UTC | newest]

Thread overview: 11+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2021-10-08 15:03 [Bug c++/102651] New: typeid(X**) instantiates X pdimov at gmail dot com
2021-10-08 18:55 ` [Bug c++/102651] [9/10/11/12 Regression] " pinskia at gcc dot gnu.org
2021-10-08 19:15 ` pinskia at gcc dot gnu.org
2022-01-17 13:14 ` [Bug c++/102651] [9/10/11/12 Regression] typeid(X**) instantiates X caused by r0-109856 rguenth at gcc dot gnu.org
2022-04-15 15:06 ` jason at gcc dot gnu.org
2022-04-15 15:06 ` jason at gcc dot gnu.org
2022-04-29  3:00 ` [Bug c++/102651] [9/10/11/12/13 " cvs-commit at gcc dot gnu.org
2022-05-15 16:29 ` [Bug c++/102651] [9/10/11/12 " cvs-commit at gcc dot gnu.org
2022-05-27  9:46 ` [Bug c++/102651] [10/11 " rguenth at gcc dot gnu.org
2022-06-28 10:46 ` jakub at gcc dot gnu.org
2023-07-07 10:41 ` [Bug c++/102651] [11 " rguenth 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).