This is the mail archive of the
gcc-bugs@gcc.gnu.org
mailing list for the GCC project.
c++/1632: Invalid and incomprehensible error message
- To: gcc-gnats at gcc dot gnu dot org
- Subject: c++/1632: Invalid and incomprehensible error message
- From: wolfgang dot bangerth at iwr dot uni-heidelberg dot de
- Date: 12 Jan 2001 16:06:59 -0000
- Reply-To: wolfgang dot bangerth at iwr dot uni-heidelberg dot de
>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: