public inbox for gcc-prs@sourceware.org
help / color / mirror / Atom feed
* c++/99: Bug in type in error message.
@ 2002-11-20 18:43 Wolfgang Bangerth
  0 siblings, 0 replies; 2+ messages in thread
From: Wolfgang Bangerth @ 2002-11-20 18:43 UTC (permalink / raw)
  To: gdr; +Cc: gcc-prs

The following reply was made to PR c++/99; it has been noted by GNATS.

From: Wolfgang Bangerth <bangerth@apex68.ticam.utexas.edu>
To: gcc-gnats@gcc.gnu.org
Cc:  
Subject: c++/99: Bug in type in error message.
Date: Thu, 14 Nov 2002 14:23:32 -0600

 Re-confirmed with 3.3 CVS from 2002-11-10 and 3.2.1 pre from the same date.


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

* Re: c++/99: Bug in type in error message.
@ 2002-11-10 11:26 Wolfgang Bangerth
  0 siblings, 0 replies; 2+ messages in thread
From: Wolfgang Bangerth @ 2002-11-10 11:26 UTC (permalink / raw)
  To: gdr; +Cc: gcc-prs

The following reply was made to PR c++/99; it has been noted by GNATS.

From: Wolfgang Bangerth <bangerth@ticam.utexas.edu>
To: gcc-gnats@gcc.gnu.org
Cc:  
Subject: Re: c++/99: Bug in type in error message.
Date: Sun, 10 Nov 2002 13:24:13 -0600 (CST)

 A slightly simpler to read example is this:
 ------------------------------------
 template<int p> class X { };
 
 template<int n, int m> int f(X<n>, X<m>) {
   return f(X<n-1>(), X<m-1>()) + f(X<n-1>(), X<m>());
 }
 
 template<int n> int f(X<n>, X<0>);
 template<int m> int f(X<0>, X<m>);
 
 int main(void) {
    return f(X<2>(), X<1>());
 }
 --------------------------------------
 
 The messages I get are these:
 x.cc: In function `int f(X<n>, X<m>) [with int n = 1, int m = 1]':
 x.cc:4:   instantiated from `int f(X<n>, X<m>) [with int n = 2, int m = 1]'
 x.cc:11:   instantiated from here
 x.cc:4: error: call of overloaded `f(X<0>, X<0>)' is ambiguous
 x.cc:3: error: candidates are: int f(X<n>, X<m>) [with int n = 0, int m = 0]
 x.cc:7: error:                 int f(X<n>, X<0>) [with int n = 0]
 x.cc:8: error:                 int f(X<0>, X<n>) [with int m = 0]
 
 Note the last line with "n" vs. "m".
 
 -------------------------------------------------------------------------
 Wolfgang Bangerth              email:           bangerth@ticam.utexas.edu
                                www: http://www.ticam.utexas.edu/~bangerth
 
 


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

end of thread, other threads:[~2002-11-14 20:26 UTC | newest]

Thread overview: 2+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2002-11-20 18:43 c++/99: Bug in type in error message Wolfgang Bangerth
  -- strict thread matches above, loose matches on Subject: below --
2002-11-10 11:26 Wolfgang Bangerth

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).