public inbox for gcc-prs@sourceware.org
help / color / mirror / Atom feed
* c++/7468: prototype "doesn't match" a candidate that is actually a perfect match.
@ 2002-08-01 19:56 carlo
  0 siblings, 0 replies; 6+ messages in thread
From: carlo @ 2002-08-01 19:56 UTC (permalink / raw)
  To: gcc-gnats


>Number:         7468
>Category:       c++
>Synopsis:       prototype "doesn't match" a candidate that is actually a perfect match.
>Confidential:   no
>Severity:       serious
>Priority:       medium
>Responsible:    unassigned
>State:          open
>Class:          rejects-legal
>Submitter-Id:   net
>Arrival-Date:   Thu Aug 01 19:56:00 PDT 2002
>Closed-Date:
>Last-Modified:
>Originator:     carlo@alinoe.com
>Release:        all releases (2.95, 2.96, 3.0.x, 3.1)
>Organization:
>Environment:

>Description:
The compiler aborts compilation with an error
along the lines off:

troep.cc:10: prototype for `bitset<n>::bitset(int (*)[bitset<n>::digits])' does
   not match any in class `bitset<n>'
troep.cc:6: candidate is: bitset<n>::bitset(int (*)[bitset<n>::digits])
>How-To-Repeat:
Compile this:

template<unsigned int n>
  class bitset {
    public:
      static int const digits = 4;
      typedef int foo_t[digits];
      bitset(foo_t*);
  };

template<unsigned int n>
  bitset<n>::bitset(foo_t*) { }

Note that the error goes away
when either
1) the template is removed
2) the static const is removed and '4' is put directly in the typedef
3) the typedef is replaced by a more normal typedef
4) the (foo_t*) is replaced with (foo_t)

Very peculiar bug.
>Fix:
Put the body inside the class declaration.
>Release-Note:
>Audit-Trail:
>Unformatted:


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

* Re: c++/7468: prototype "doesn't match" a candidate that is actually a perfect match.
@ 2003-01-28 16:53 bangerth
  0 siblings, 0 replies; 6+ messages in thread
From: bangerth @ 2003-01-28 16:53 UTC (permalink / raw)
  To: carlo, gcc-bugs, gcc-prs, nobody

Synopsis: prototype "doesn't match" a candidate that is actually a perfect match.

State-Changed-From-To: analyzed->closed
State-Changed-By: bangerth
State-Changed-When: Tue Jan 28 16:53:55 2003
State-Changed-Why:
    Yet another duplicate of PR 38 (I think I alone have closed
    about a dozen or so...)

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


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

* Re: c++/7468: prototype "doesn't match" a candidate that is actually a perfect match.
@ 2002-09-13 16:35 nathan
  0 siblings, 0 replies; 6+ messages in thread
From: nathan @ 2002-09-13 16:35 UTC (permalink / raw)
  To: carlo, gcc-bugs, gcc-prs, nobody

Synopsis: prototype "doesn't match" a candidate that is actually a perfect match.

State-Changed-From-To: open->analyzed
State-Changed-By: nathan
State-Changed-When: Fri Sep 13 16:35:43 2002
State-Changed-Why:
    confirmed

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


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

* Re: c++/7468: prototype "doesn't match" a candidate that is actually a perfect match.
@ 2002-08-02  6:46 Gabriel Dos Reis
  0 siblings, 0 replies; 6+ messages in thread
From: Gabriel Dos Reis @ 2002-08-02  6:46 UTC (permalink / raw)
  To: nobody; +Cc: gcc-prs

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

From: Gabriel Dos Reis <gdr@integrable-solutions.net>
To: Carlo Wood <carlo@alinoe.com>
Cc: gcc-gnats@gcc.gnu.org
Subject: Re: c++/7468: prototype "doesn't match" a candidate that is actually a perfect match.
Date: 02 Aug 2002 15:36:49 +0200

 Carlo Wood <carlo@alinoe.com> writes:
 
 | On Fri, Aug 02, 2002 at 10:55:41AM +0200, Gabriel Dos Reis wrote:
 | > carlo@alinoe.com writes:
 | > 
 | > [...]
 | > 
 | > | Note that the error goes away
 | > | when either
 | > | 1) the template is removed
 | > | 2) the static const is removed and '4' is put directly in the typedef
 | > | 3) the typedef is replaced by a more normal typedef
 | > | 4) the (foo_t*) is replaced with (foo_t)
 | > | 
 | > | Very peculiar bug.
 | > 
 | > Indeed.  This bug is actually a duplicate of old PRs (I don't have the
 | > id off hand but I do know it is there since :-).  I'll close yours and
 | > mention the previous entry.  OK?
 | > 
 | > -- Gaby
 | 
 | Hmm, not really ok unless you are sure it will be fixed.
 
 Since the problems are the same, if one is fixed then the other will
 be fixed :-)
 
 | This problem looks a bit like PR 54, but that has been suspended
 | for "years" :/.  Besides, it says "it was fixed" (a year ago),
 | so are you SURE this isn't a new bug?
 
 it says it is fixed on the old *cp-branch*, not in the 3.2 branch.
 
 -- Gaby


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

* Re: c++/7468: prototype "doesn't match" a candidate that is actually a perfect match.
@ 2002-08-02  5:26 Carlo Wood
  0 siblings, 0 replies; 6+ messages in thread
From: Carlo Wood @ 2002-08-02  5:26 UTC (permalink / raw)
  To: nobody; +Cc: gcc-prs

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

From: Carlo Wood <carlo@alinoe.com>
To: Gabriel Dos Reis <gdr@integrable-solutions.net>
Cc: gcc-gnats@gcc.gnu.org
Subject: Re: c++/7468: prototype "doesn't match" a candidate that is actually a perfect match.
Date: Fri, 2 Aug 2002 14:20:58 +0200

 On Fri, Aug 02, 2002 at 10:55:41AM +0200, Gabriel Dos Reis wrote:
 > carlo@alinoe.com writes:
 > 
 > [...]
 > 
 > | Note that the error goes away
 > | when either
 > | 1) the template is removed
 > | 2) the static const is removed and '4' is put directly in the typedef
 > | 3) the typedef is replaced by a more normal typedef
 > | 4) the (foo_t*) is replaced with (foo_t)
 > | 
 > | Very peculiar bug.
 > 
 > Indeed.  This bug is actually a duplicate of old PRs (I don't have the
 > id off hand but I do know it is there since :-).  I'll close yours and
 > mention the previous entry.  OK?
 > 
 > -- Gaby
 
 Hmm, not really ok unless you are sure it will be fixed.
 This problem looks a bit like PR 54, but that has been suspended
 for "years" :/.  Besides, it says "it was fixed" (a year ago),
 so are you SURE this isn't a new bug?
 
 -- 
 Carlo Wood <carlo@alinoe.com>


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

* Re: c++/7468: prototype "doesn't match" a candidate that is actually a perfect match.
@ 2002-08-02  2:06 Gabriel Dos Reis
  0 siblings, 0 replies; 6+ messages in thread
From: Gabriel Dos Reis @ 2002-08-02  2:06 UTC (permalink / raw)
  To: nobody; +Cc: gcc-prs

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

From: Gabriel Dos Reis <gdr@integrable-solutions.net>
To: carlo@alinoe.com
Cc: gcc-gnats@gcc.gnu.org
Subject: Re: c++/7468: prototype "doesn't match" a candidate that is actually a perfect match.
Date: 02 Aug 2002 10:55:41 +0200

 carlo@alinoe.com writes:
 
 [...]
 
 | Note that the error goes away
 | when either
 | 1) the template is removed
 | 2) the static const is removed and '4' is put directly in the typedef
 | 3) the typedef is replaced by a more normal typedef
 | 4) the (foo_t*) is replaced with (foo_t)
 | 
 | Very peculiar bug.
 
 Indeed.  This bug is actually a duplicate of old PRs (I don't have the
 id off hand but I do know it is there since :-).  I'll close yours and
 mention the previous entry.  OK?
 
 -- Gaby


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

end of thread, other threads:[~2003-01-28 16:53 UTC | newest]

Thread overview: 6+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2002-08-01 19:56 c++/7468: prototype "doesn't match" a candidate that is actually a perfect match carlo
2002-08-02  2:06 Gabriel Dos Reis
2002-08-02  5:26 Carlo Wood
2002-08-02  6:46 Gabriel Dos Reis
2002-09-13 16:35 nathan
2003-01-28 16:53 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).