This is the mail archive of the
gcc@gcc.gnu.org
mailing list for the GCC project.
Error message formatting feature request
- From: Jeremiah Willcock <jewillco at osl dot iu dot edu>
- To: gcc at gcc dot gnu dot org
- Date: Wed, 1 Sep 2010 15:41:58 -0400 (EDT)
- Subject: Error message formatting feature request
When compiling a program such as:
template <typename T>
void foo(T, typename T::type c) {c.y();}
struct x {typedef int type;};
void f() {foo(x(), 3);}
GCC 4.5.0 (correctly) produces the error message:
foo.cpp: In function ‘void foo(T, typename T::type) [with T = x, typename
T::type = int]’:
foo.cpp:4:21: instantiated from here
foo.cpp:2:34: error: request for member ‘y’ in ‘c’, which is of non-class
type ‘x::type’
My feature request is to have the comma between "T = x" and "typename
T::type = int" replaced by a semicolon. In larger programs, the types
given in the error message often themselves contain commas, while they do
not typically contain semicolons. Thus, this change would make the error
messages easier to understand (and, in particular, to skim).
-- Jeremiah Willcock