This is the mail archive of the
gcc-bugs@gcc.gnu.org
mailing list for the GCC project.
[Bug c++/17693] New: Error message enhancement
- From: "v dot haisman at sh dot cvut dot cz" <gcc-bugzilla at gcc dot gnu dot org>
- To: gcc-bugs at gcc dot gnu dot org
- Date: 27 Sep 2004 14:38:37 -0000
- Subject: [Bug c++/17693] New: Error message enhancement
- Reply-to: gcc-bugzilla at gcc dot gnu dot org
This test case has two erros:
namespace A
{
typedef int my_test;
template <typename T>
void g ()
{
T::a;
}
void f ()
{
g<my_test>();
}
}
namespace B
{
typedef char mysize_t;
void g (void *, mysize_t)
{ }
template <typename T, typename U>
void f (T x, U y)
{
g (y, x);
}
void h ()
{
f (0, static_cast<mysize_t>(1));
}
}
wilx@logout:::~/podpos> g++ -W -Wall -ansi -pedantic -c dedtest.cxx
dedtest.cxx: In function `void A::g() [with T = A::my_test]':
dedtest.cxx:13: instantiated from here
dedtest.cxx:8: error: `a' is not a member of `A::my_test'
dedtest.cxx: In function `void B::f(T, U) [with T = int, U = char]':
dedtest.cxx:32: instantiated from here
dedtest.cxx:27: error: invalid conversion from `char' to `void*'
The first one produces error message that uses the typedef'ed name: [with T =
A::my_test]
The second one produces error message that doesn't use the typedef'ed name:
[with T = int, U = char]
It would be really nice to see the typedef'ed name in the second error message too.
--
Summary: Error message enhancement
Product: gcc
Version: 4.0.0
Status: UNCONFIRMED
Severity: enhancement
Priority: P2
Component: c++
AssignedTo: unassigned at gcc dot gnu dot org
ReportedBy: v dot haisman at sh dot cvut dot cz
CC: gcc-bugs at gcc dot gnu dot org,v dot haisman at sh dot
cvut dot cz
http://gcc.gnu.org/bugzilla/show_bug.cgi?id=17693