public inbox for gcc-bugs@sourceware.org
help / color / mirror / Atom feed
* [Bug c++/43275] New: Unclear error message
@ 2010-03-06 15:18 kai dot extern at googlemail dot com
0 siblings, 0 replies; only message in thread
From: kai dot extern at googlemail dot com @ 2010-03-06 15:18 UTC (permalink / raw)
To: gcc-bugs
This error message:
error: type 'type1' is not derived from 'type2'
is rather unclear. The first reaction is to look at the source, see that
indeed, type1 is not derived from type2, and say "... and why does that
matter?!"
Source:
template < typename A > struct B {
typedef int C;
};
template < typename A > struct D {
struct E {
B < A >::C f;
};
};
6: error: type 'B<A>' is not derived from type 'D<A>::E'
6: error: expected ';' before 'f'
The problem here is that there should be a 'typename' before 'B<A>::C', but the
error message contains no hint of that, in addition to missing any hint of why
the compiler would expect a derived type here anyway.
--
Summary: Unclear error message
Product: gcc
Version: 4.4.1
Status: UNCONFIRMED
Severity: enhancement
Priority: P3
Component: c++
AssignedTo: unassigned at gcc dot gnu dot org
ReportedBy: kai dot extern at googlemail dot com
GCC build triplet: x86_64-linux-gnu
GCC host triplet: x86_64-linux-gnu
GCC target triplet: x86_64-linux-gnu
http://gcc.gnu.org/bugzilla/show_bug.cgi?id=43275
^ permalink raw reply [flat|nested] only message in thread
only message in thread, other threads:[~2010-03-06 15:18 UTC | newest]
Thread overview: (only message) (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2010-03-06 15:18 [Bug c++/43275] New: Unclear error message kai dot extern at googlemail dot com
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).