------- Comment #3 from steven at gcc dot gnu dot org 2008-11-22 18:20 ------- With a trivial one-liner patch this could look a lot better:
$ ./cc1plus t.C void foo() t.C:6: error: no match for 'operator=' in 'a = ({...})' t.C:1: note: candidates are: A& A::operator=(const A&) Execution times (seconds) name lookup : 0.01 (25%) usr 0.00 ( 0%) sys 0.01 (25%) wall 82 kB ( 5%) ggc TOTAL : 0.03 0.00 0.03 1508 kB Extra diagnostic checks enabled; compiler may run slowly. Configure with --enable-checking=release to disable checks. $ Of course, a message reproducing the source line with a carret and all that would be even better -- hi Aldy! -- but for now this is probably the best we can do. Untested, I have no commitment to this patch ;-) Index: ../../trunk/gcc/cp/error.c =================================================================== --- ../../trunk/gcc/cp/error.c (revision 142123) +++ ../../trunk/gcc/cp/error.c (working copy) @@ -1976,6 +1976,7 @@ break; case BIND_EXPR: + case EXPR_STMT: case STMT_EXPR: case STATEMENT_LIST: /* We don't yet have a way of dumping statements in a -- http://gcc.gnu.org/bugzilla/show_bug.cgi?id=35335