public inbox for gcc-bugs@sourceware.org
help / color / mirror / Atom feed
* [Bug c++/108676] New: GCC prints function signature incorrectly
@ 2023-02-05 14:34 vanyacpp at gmail dot com
2023-02-05 14:37 ` [Bug c++/108676] template parameters are misprinted in function signature vanyacpp at gmail dot com
` (2 more replies)
0 siblings, 3 replies; 4+ messages in thread
From: vanyacpp at gmail dot com @ 2023-02-05 14:34 UTC (permalink / raw)
To: gcc-bugs
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=108676
Bug ID: 108676
Summary: GCC prints function signature incorrectly
Product: gcc
Version: 12.2.1
Status: UNCONFIRMED
Severity: normal
Priority: P3
Component: c++
Assignee: unassigned at gcc dot gnu.org
Reporter: vanyacpp at gmail dot com
Target Milestone: ---
Consider this code:
template <typename T>
struct X
{};
template <typename U>
X<U&> f();
template <typename V>
X<V&> g();
int main()
{
g<void>();
}
On GCC 12.2 it gives this error message:
<source>:13:12: error: no matching function for call to 'g<void>()'
13 | g<void>();
| ~~~~~~~^~
<source>:9:7: note: candidate: 'template<class V> X<U&> g()'
9 | X<V&> g();
| ^
Please note that the return type of 'g' is printed incorrectly. It should say
'X<V&>' instead of 'X<U&>'.
https://godbolt.org/z/EeWoo16M
^ permalink raw reply [flat|nested] 4+ messages in thread
* [Bug c++/108676] template parameters are misprinted in function signature
2023-02-05 14:34 [Bug c++/108676] New: GCC prints function signature incorrectly vanyacpp at gmail dot com
@ 2023-02-05 14:37 ` vanyacpp at gmail dot com
2023-02-06 9:31 ` redi at gcc dot gnu.org
2023-02-06 10:18 ` vanyacpp at gmail dot com
2 siblings, 0 replies; 4+ messages in thread
From: vanyacpp at gmail dot com @ 2023-02-05 14:37 UTC (permalink / raw)
To: gcc-bugs
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=108676
--- Comment #1 from Ivan Sorokin <vanyacpp at gmail dot com> ---
I added a broken link to godbolt, here is a valid one:
https://godbolt.org/z/EE5eezW1r
^ permalink raw reply [flat|nested] 4+ messages in thread
* [Bug c++/108676] template parameters are misprinted in function signature
2023-02-05 14:34 [Bug c++/108676] New: GCC prints function signature incorrectly vanyacpp at gmail dot com
2023-02-05 14:37 ` [Bug c++/108676] template parameters are misprinted in function signature vanyacpp at gmail dot com
@ 2023-02-06 9:31 ` redi at gcc dot gnu.org
2023-02-06 10:18 ` vanyacpp at gmail dot com
2 siblings, 0 replies; 4+ messages in thread
From: redi at gcc dot gnu.org @ 2023-02-06 9:31 UTC (permalink / raw)
To: gcc-bugs
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=108676
Jonathan Wakely <redi at gcc dot gnu.org> changed:
What |Removed |Added
----------------------------------------------------------------------------
See Also| |https://gcc.gnu.org/bugzill
| |a/show_bug.cgi?id=66968
Last reconfirmed| |2023-02-06
Status|UNCONFIRMED |NEW
Ever confirmed|0 |1
--- Comment #2 from Jonathan Wakely <redi at gcc dot gnu.org> ---
Probably a dup of PR 66968
^ permalink raw reply [flat|nested] 4+ messages in thread
* [Bug c++/108676] template parameters are misprinted in function signature
2023-02-05 14:34 [Bug c++/108676] New: GCC prints function signature incorrectly vanyacpp at gmail dot com
2023-02-05 14:37 ` [Bug c++/108676] template parameters are misprinted in function signature vanyacpp at gmail dot com
2023-02-06 9:31 ` redi at gcc dot gnu.org
@ 2023-02-06 10:18 ` vanyacpp at gmail dot com
2 siblings, 0 replies; 4+ messages in thread
From: vanyacpp at gmail dot com @ 2023-02-06 10:18 UTC (permalink / raw)
To: gcc-bugs
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=108676
Ivan Sorokin <vanyacpp at gmail dot com> changed:
What |Removed |Added
----------------------------------------------------------------------------
Resolution|--- |DUPLICATE
Status|NEW |RESOLVED
--- Comment #3 from Ivan Sorokin <vanyacpp at gmail dot com> ---
(In reply to Jonathan Wakely from comment #2)
> Probably a dup of PR 66968
Yes, it looks similar enough. Thank you!
*** This bug has been marked as a duplicate of bug 66968 ***
^ permalink raw reply [flat|nested] 4+ messages in thread
end of thread, other threads:[~2023-02-06 10:18 UTC | newest]
Thread overview: 4+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2023-02-05 14:34 [Bug c++/108676] New: GCC prints function signature incorrectly vanyacpp at gmail dot com
2023-02-05 14:37 ` [Bug c++/108676] template parameters are misprinted in function signature vanyacpp at gmail dot com
2023-02-06 9:31 ` redi at gcc dot gnu.org
2023-02-06 10:18 ` vanyacpp at gmail dot com
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).