public inbox for gcc-bugs@sourceware.org
help / color / mirror / Atom feed
* [Bug c++/96944] New: call of overloaded is ambiguous
@ 2020-09-05 14:06 tangyixuan at mail dot dlut.edu.cn
2021-08-17 4:40 ` [Bug c++/96944] " pinskia at gcc dot gnu.org
0 siblings, 1 reply; 2+ messages in thread
From: tangyixuan at mail dot dlut.edu.cn @ 2020-09-05 14:06 UTC (permalink / raw)
To: gcc-bugs
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=96944
Bug ID: 96944
Summary: call of overloaded is ambiguous
Product: gcc
Version: 11.0
Status: UNCONFIRMED
Severity: normal
Priority: P3
Component: c++
Assignee: unassigned at gcc dot gnu.org
Reporter: tangyixuan at mail dot dlut.edu.cn
Target Milestone: ---
The following code is rejected by g++. clang++ compiles it successfully.
$ cat s.cpp
template < int I > int F( char [I]);
template < int I > int F( char a = I );
int b = F<0>(0);
$ g++ -c s.cpp
s.cpp:3:15: error: call of overloaded ‘F<0>(int)’ is ambiguous
3 | int b = F<0>(0);
| ^
s.cpp:1:24: note: candidate: ‘int F(char*) [with int I = 0]’
1 | template < int I > int F( char [I]);
| ^
s.cpp:2:24: note: candidate: ‘int F(char) [with int I = 0]’
2 | template < int I > int F( char a = I );
|
^ permalink raw reply [flat|nested] 2+ messages in thread
* [Bug c++/96944] call of overloaded is ambiguous
2020-09-05 14:06 [Bug c++/96944] New: call of overloaded is ambiguous tangyixuan at mail dot dlut.edu.cn
@ 2021-08-17 4:40 ` pinskia at gcc dot gnu.org
0 siblings, 0 replies; 2+ messages in thread
From: pinskia at gcc dot gnu.org @ 2021-08-17 4:40 UTC (permalink / raw)
To: gcc-bugs
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=96944
Andrew Pinski <pinskia at gcc dot gnu.org> changed:
What |Removed |Added
----------------------------------------------------------------------------
Status|UNCONFIRMED |RESOLVED
Resolution|--- |DUPLICATE
--- Comment #1 from Andrew Pinski <pinskia at gcc dot gnu.org> ---
This is a dup of bug 24663.
*** This bug has been marked as a duplicate of bug 24663 ***
^ permalink raw reply [flat|nested] 2+ messages in thread
end of thread, other threads:[~2021-08-17 4:40 UTC | newest]
Thread overview: 2+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2020-09-05 14:06 [Bug c++/96944] New: call of overloaded is ambiguous tangyixuan at mail dot dlut.edu.cn
2021-08-17 4:40 ` [Bug c++/96944] " pinskia 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).