public inbox for gcc-prs@sourceware.org
help / color / mirror / Atom feed
* Re: c++/6125: template parameter of type ptr-to-member does not match
@ 2002-09-15 11:28 nathan
  0 siblings, 0 replies; 2+ messages in thread
From: nathan @ 2002-09-15 11:28 UTC (permalink / raw)
  To: gcc-bugs, gcc-prs, nobody, tot

Synopsis: template parameter of type ptr-to-member does not match

State-Changed-From-To: open->closed
State-Changed-By: nathan
State-Changed-When: Sun Sep 15 11:28:39 2002
State-Changed-Why:
    current cvs reports,
    nathan@uha:463>g++ -c 6125.cc 
    6125.cc: In member function `bool call_them::operator()(bool 
       (A::*)(std::ostream&) const)':
    6125.cc:30: warning: no return statement in function returning non-void
    6125.cc:30: warning: control reaches end of non-void function
    
    which looks right to me

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


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

* c++/6125: template parameter of type ptr-to-member does not match
@ 2002-04-01 13:36 tot
  0 siblings, 0 replies; 2+ messages in thread
From: tot @ 2002-04-01 13:36 UTC (permalink / raw)
  To: gcc-gnats


>Number:         6125
>Category:       c++
>Synopsis:       template parameter of type ptr-to-member does not match
>Confidential:   no
>Severity:       serious
>Priority:       medium
>Responsible:    unassigned
>State:          open
>Class:          sw-bug
>Submitter-Id:   net
>Arrival-Date:   Mon Apr 01 13:36:00 PST 2002
>Closed-Date:
>Last-Modified:
>Originator:     tot@trema.com
>Release:        gcc 3.1 20020401 (fails also with a week earlier version)
>Organization:
>Environment:
Mandrake 8.2 i586	
>Description:
The following code bug.cc does not compile.  
The compiler does not find a matching method in copy-ctor.

It works and compiles fine if the parameter to 'tester' is passed as reference and not by value.

This is regression from 3.0.
>How-To-Repeat:
Try compiling bug.cc without any options.  The compiler will say
/opt/gcc3.1/lib/gcc-lib/i686-pc-linux-gnu/3.1/include/g++/bits/stl_list.h: In
   member function `void std::list<_Tp,
   _Alloc>::_M_insert_dispatch(std::_List_iterator<_Tp, _Tp&, _Tp*>,
   _InputIter, _InputIter, __false_type) [with _InputIterator =
   std::_List_iterator<bool (A::*)(std::ostream&) const, bool
   (A::*const&)(std::ostream&) const, bool (A::*const*)(std::ostream&) const>,
   _Tp = bool (A::*)(std::ostream&) const, _Alloc = std::allocator<bool
   (A::*)(std::ostream&) const>]':
/opt/gcc3.1/lib/gcc-lib/i686-pc-linux-gnu/3.1/include/g++/bits/stl_list.h:459:
 instantiated from `void std::list<_Tp, _Alloc>::insert(std::_List_iterator<_Tp, _Tp&, _Tp*>, _InputIterator, _InputIterator) [with _InputIterator = std::_List_iterator<bool (A::*)(std::ostream&) const, bool (A::*const&)(std::ostream&) const, bool (A::*const*)(std::ostream&) const>, _Tp = bool (A::*)(std::ostream&) const, _Alloc = std::allocator<bool (A::*)(std::ostream&) const>]'
/opt/gcc3.1/lib/gcc-lib/i686-pc-linux-gnu/3.1/include/g++/bits/stl_list.h:543:
 instantiated from `std::list<_Tp, _Alloc>::list(const std::list<_Tp, _Alloc>&)
[with _Tp = bool (A::*)(std::ostream&) const, _Alloc = std::allocator<bool (A::*)(std::ostream&) const>]'
bug.cc:53:   instantiated from here
/opt/gcc3.1/lib/gcc-lib/i686-pc-linux-gnu/3.1/include/g++/bits/stl_list.h:730: no
   matching function for call to `std::list<bool (A::*)(std::ostream&) const,
   std::allocator<bool (A::*)(std::ostream&) const> >::insert(
   std::_List_iterator<bool (A::*)(std::ostream&) const, bool
   (A::*&)(std::ostream&) const, bool (A::**)(std::ostream&) const>&, bool
   (A::*const&)(std::ostream&) const)'
/opt/gcc3.1/lib/gcc-lib/i686-pc-linux-gnu/3.1/include/g++/bits/stl_list.h:429: candidates
   are: std::_List_iterator<_Tp, _Tp&, _Tp*> std::list<_Tp,
   _Alloc>::insert(std::_List_iterator<_Tp, _Tp&, _Tp*>, const _Tp&) [with _Tp
   = bool (A::*)(std::ostream&) const, _Alloc = std::allocator<bool
   (A::*)(std::ostream&) const>]
/opt/gcc3.1/lib/gcc-lib/i686-pc-linux-gnu/3.1/include/g++/bits/stl_list.h:440:
                  std::_List_iterator<_Tp, _Tp&, _Tp*> std::list<_Tp,
   _Alloc>::insert(std::_List_iterator<_Tp, _Tp&, _Tp*>) [with _Tp = bool
   (A::*)(std::ostream&) const, _Alloc = std::allocator<bool
   (A::*)(std::ostream&) const>]
/opt/gcc3.1/lib/gcc-lib/i686-pc-linux-gnu/3.1/include/g++/bits/stl_list.h:464:
                  void std::list<_Tp, _Alloc>::insert(std::_List_iterator<_Tp,
   _Tp&, _Tp*>, unsigned int, const _Tp&) [with _Tp = bool
   (A::*)(std::ostream&) const, _Alloc = std::allocator<bool
   (A::*)(std::ostream&) const>]

>Fix:

>Release-Note:
>Audit-Trail:
>Unformatted:
----gnatsweb-attachment----
Content-Type: text/x-c++src; name="bug.cc"
Content-Transfer-Encoding: base64
Content-Disposition: attachment; filename="bug.cc"

I2luY2x1ZGUgPGlvc3RyZWFtPgojaW5jbHVkZSA8bGlzdD4KCnN0cnVjdCBBCnsKICB2aXJ0dWFs
IGJvb2wKICBtZXRob2RfYSAoc3RkOjpvc3RyZWFtICZvdXQpIGNvbnN0CiAgewogICAgb3V0IDw8
ICJpbiBBOjptZXRob2RfYVxuIjsKICAgIHJldHVybiB0cnVlOwogIH0KCiAgdmlydHVhbCBib29s
CiAgbWV0aG9kX2IgKHN0ZDo6b3N0cmVhbSAmb3V0KSBjb25zdAogIHsKICAgIG91dCA8PCAiaW4g
QTo6bWV0aG9kX2JcbiI7CiAgICByZXR1cm4gdHJ1ZTsKICB9Cn07Cgp0eXBlZGVmIGJvb2wgKEE6
OipjYWxsYWJsZSkgKHN0ZDo6b3N0cmVhbSAmKSBjb25zdDsKdHlwZWRlZiBzdGQ6Omxpc3Q8Y2Fs
bGFibGU+IGNhbGxhYmxlX2xpc3Q7CgpzdHJ1Y3QgY2FsbF90aGVtCnsKICBib29sCiAgb3BlcmF0
b3IgKCkgKGNhbGxhYmxlIG9uZSkKICB7CiAgICAoX2EuKm9uZSkgKF9vdXQpOwogIH0KICAKICBj
YWxsX3RoZW0gKEEgJmEsIHN0ZDo6b3N0cmVhbSAmb3V0KSA6IF9hIChhKSwgX291dCAob3V0KSB7
fQoKICBBICZfYTsKICBzdGQ6Om9zdHJlYW0gJl9vdXQ7Cn07Cgp2b2lkCnRlc3RlciAoY2FsbGFi
bGVfbGlzdCBsaXN0KQp7CiAgQSBhOwogIHN0ZDo6Zm9yX2VhY2ggKGxpc3QuYmVnaW4gKCksIGxp
c3QuZW5kICgpLAoJCSBjYWxsX3RoZW0gKGEsIHN0ZDo6Y291dCkpOwp9CgppbnQKbWFpbiAoKQp7
CiAgY2FsbGFibGVfbGlzdCBjYWxsYWJsZXM7CiAgY2FsbGFibGVzLnB1c2hfYmFjayAoJkE6Om1l
dGhvZF9hKTsKICBjYWxsYWJsZXMucHVzaF9iYWNrICgmQTo6bWV0aG9kX2IpOwoKICB0ZXN0ZXIg
KGNhbGxhYmxlcyk7CiAgcmV0dXJuIDA7Cn0K


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

end of thread, other threads:[~2002-09-15 18:28 UTC | newest]

Thread overview: 2+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2002-09-15 11:28 c++/6125: template parameter of type ptr-to-member does not match nathan
  -- strict thread matches above, loose matches on Subject: below --
2002-04-01 13:36 tot

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