This is the mail archive of the gcc-bugs@gcc.gnu.org mailing list for the GCC project.


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]

c++/1632: Invalid and incomprehensible error message



>Number:         1632
>Category:       c++
>Synopsis:       Invalid and incomprehensible error message
>Confidential:   no
>Severity:       serious
>Priority:       medium
>Responsible:    unassigned
>State:          open
>Class:          rejects-legal
>Submitter-Id:   net
>Arrival-Date:   Fri Jan 12 08:16:02 PST 2001
>Closed-Date:
>Last-Modified:
>Originator:     Wolfgang Bangerth
>Release:        unknown-1.0
>Organization:
>Environment:
Yesterday's CVS (2000/01/11)
>Description:
With yesterday's CVS I got the following message:
deal.II/deal.II> cat t.cc
  struct X;

  template <int dim> struct Y {
      X* f (int i = 0) const;
  };

  template <>
  X* Y<2>::f (int i) const {
    return f(i);
  };
deal.II/deal.II> c++ -c t.cc -o /dev/null
  t.cc: In method `X* Y<dim>::f(int) const [with int dim = 2]':
  t.cc:4: prior parameter's size depends on `const Y<2>* const this'

Besides the fact that I have no clue what the compiler wants to
tell me (what is that "prior parameter"?), the message is bogus
and goes away if (among other possibilities) I
- remove the default value of "i"
- remove the "const"ness of the function.
Seems as if something's thoroughly wrong.

Regards
  Wolfgang
>How-To-Repeat:

>Fix:

>Release-Note:
>Audit-Trail:
>Unformatted:

Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]