public inbox for gcc-bugs@sourceware.org
help / color / mirror / Atom feed
* [Bug c++/53822] New: Diagnostic: spell out type in ambiguous call
@ 2012-06-30 16:57 glisse at gcc dot gnu.org
  2012-06-30 16:59 ` [Bug c++/53822] " glisse at gcc dot gnu.org
                   ` (6 more replies)
  0 siblings, 7 replies; 8+ messages in thread
From: glisse at gcc dot gnu.org @ 2012-06-30 16:57 UTC (permalink / raw)
  To: gcc-bugs

http://gcc.gnu.org/bugzilla/show_bug.cgi?id=53822

             Bug #: 53822
           Summary: Diagnostic: spell out type in ambiguous call
    Classification: Unclassified
           Product: gcc
           Version: 4.8.0
            Status: UNCONFIRMED
          Severity: normal
          Priority: P3
         Component: c++
        AssignedTo: unassigned@gcc.gnu.org
        ReportedBy: glisse@gcc.gnu.org


Hello,

void f(float);
void f(double);
int main(){
  typedef unsigned NT;
  NT i=3;
  f(i);
}

mp.cc: In function ‘int main()’:
mp.cc:6:6: error: call of overloaded ‘f(NT&)’ is ambiguous
mp.cc:6:6: note: candidates are:
mp.cc:1:6: note: void f(float)
mp.cc:2:6: note: void f(double)

Notice that the error message never mentions "unsigned". In the middle of some
deep templated code, finding out what the problematic NT is can be hard.


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

end of thread, other threads:[~2021-08-10  0:11 UTC | newest]

Thread overview: 8+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2012-06-30 16:57 [Bug c++/53822] New: Diagnostic: spell out type in ambiguous call glisse at gcc dot gnu.org
2012-06-30 16:59 ` [Bug c++/53822] " glisse at gcc dot gnu.org
2013-04-19 15:27 ` paolo.carlini at oracle dot com
2014-01-02 21:23 ` [Bug c++/53822] spell out typedefs " glisse at gcc dot gnu.org
2014-01-02 23:05 ` manu at gcc dot gnu.org
2014-01-03 11:56 ` manu at gcc dot gnu.org
2021-08-10  0:11 ` pinskia at gcc dot gnu.org
2021-08-10  0:11 ` 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).