public inbox for gcc-prs@sourceware.org
help / color / mirror / Atom feed
* Re: c++/3784: function not found if integer template parameter declared as unsigned in a different function
@ 2002-11-05 12:36 Wolfgang Bangerth
  0 siblings, 0 replies; 2+ messages in thread
From: Wolfgang Bangerth @ 2002-11-05 12:36 UTC (permalink / raw)
  To: nathan; +Cc: gcc-prs

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

From: Wolfgang Bangerth <bangerth@ticam.utexas.edu>
To: gcc-bugs@gcc.gnu.org, <gcc-gnats@gcc.gnu.org>
Cc:  
Subject: Re: c++/3784: function not found if integer template parameter
 declared as unsigned in a different function
Date: Tue, 5 Nov 2002 14:30:31 -0600 (CST)

 There's definitely going on something fishy here:
 -------------------------------------------------
 template <typename T, unsigned N> class X { };
 
 template <typename T, int N>       void foo1(X<T,N>);
 template <typename T, unsigned N>  void foo2(X<T,N>);
 
 int main() {
   X<float, 2> x;
   foo2(x);
 }
 -------------------------------------------------
 
 This compiles fine if I remove the foo1 function that is not referenced at 
 all. If I leave it in, I get this:
 
 tmp/g> /home/bangerth/bin/gcc-3.3x-pre/bin/c++ test.cc
 test.cc: In function `int main()':
 test.cc:9: error: no matching function for call to `foo2(X<float, 2>&)'
 
 Seems as if on the definition of foo1, something's erroneously 
 overwritten.
 
 Regards
   Wolfgang
 
 -------------------------------------------------------------------------
 Wolfgang Bangerth              email:           bangerth@ticam.utexas.edu
                                www: http://www.ticam.utexas.edu/~bangerth
 
 


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

* Re: c++/3784: function not found if integer template parameter declared as unsigned in a different function
@ 2001-12-15 11:53 nathan
  0 siblings, 0 replies; 2+ messages in thread
From: nathan @ 2001-12-15 11:53 UTC (permalink / raw)
  To: gcc-bugs, gcc-prs, holt, nathan, nobody

Synopsis: function not found if integer template parameter declared as unsigned in a different function

Responsible-Changed-From-To: unassigned->nathan
Responsible-Changed-By: nathan
Responsible-Changed-When: Sat Dec 15 11:53:32 2001
Responsible-Changed-Why:
    I think this might be a duplicate of PR 45
State-Changed-From-To: open->analyzed
State-Changed-By: nathan
State-Changed-When: Sat Dec 15 11:53:32 2001
State-Changed-Why:
    Yup

http://gcc.gnu.org/cgi-bin/gnatsweb.pl?cmd=view%20audit-trail&database=gcc&pr=3784


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

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

Thread overview: 2+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2002-11-05 12:36 c++/3784: function not found if integer template parameter declared as unsigned in a different function Wolfgang Bangerth
  -- strict thread matches above, loose matches on Subject: below --
2001-12-15 11:53 nathan

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