This is the mail archive of the
gcc-bugs@gcc.gnu.org
mailing list for the GCC project.
[Bug c++/17763] Wrong context in error message for template parameter
- From: "bangerth at dealii dot org" <gcc-bugzilla at gcc dot gnu dot org>
- To: gcc-bugs at gcc dot gnu dot org
- Date: 1 Oct 2004 13:13:04 -0000
- Subject: [Bug c++/17763] Wrong context in error message for template parameter
- References: <20041001020944.17763.solodon@mail.com>
- Reply-to: gcc-bugzilla at gcc dot gnu dot org
------- Additional Comments From bangerth at dealii dot org 2004-10-01 13:12 -------
Confirmed. Take this smaller testcase:
----------------------
template <typename U> struct Outer {
struct Inner {};
Inner foo();
};
typedef int X;
typedef Outer<X> XOuter;
int main() {
Outer<int> ab;
ab.foo() == 1;
}
------------------------
Clearly, we make no use of the typedefs 'X' and 'XOuter', but we get this
error message:
g/x> /home/bangerth/bin/gcc-4.0-pre/bin/c++ -c x.cc
x.cc: In function `int main()':
x.cc:11: error: no match for 'operator==' in 'ab. Outer<U>::foo [with U = X]()
== 1'
The part of the error message in brackets should really read '[with U=int]',
rather than mention 'X'. Note that if I remove the 'XOuter' typedef, then
I do indeed get what I want.
W.
--
What |Removed |Added
----------------------------------------------------------------------------
Status|RESOLVED |UNCONFIRMED
Resolution|FIXED |
http://gcc.gnu.org/bugzilla/show_bug.cgi?id=17763