Commit aee5c3ed by Jakub Jelinek Committed by Jakub Jelinek

re PR c++/35335 (Broken diagnostic: 'expr_stmt' not supported by dump_expr)

	PR c++/35335
	* error.c (dump_expr): Handle EXPR_STMT like BIND_EXPR.

	* g++.dg/other/error31.C: New testcase.

From-SVN: r143210
parent 260fda3d
2009-01-09 Jakub Jelinek <jakub@redhat.com>
PR c++/35335
* error.c (dump_expr): Handle EXPR_STMT like BIND_EXPR.
2009-01-09 John F. Carr <jfc@mit.edu>
PR c++/37877
......
/* Call-backs for C++ error reporting.
This code is non-reentrant.
Copyright (C) 1993, 1994, 1995, 1996, 1997, 1998, 1999, 2000, 2002,
2003, 2004, 2005, 2006, 2007, 2008 Free Software Foundation, Inc.
2003, 2004, 2005, 2006, 2007, 2008, 2009 Free Software Foundation, Inc.
This file is part of GCC.
GCC is free software; you can redistribute it and/or modify
......@@ -1977,6 +1977,7 @@ dump_expr (tree t, int flags)
case BIND_EXPR:
case STMT_EXPR:
case EXPR_STMT:
case STATEMENT_LIST:
/* We don't yet have a way of dumping statements in a
human-readable format. */
......
2009-01-09 Jakub Jelinek <jakub@redhat.com>
PR c++/35335
* g++.dg/other/error31.C: New testcase.
PR c/35742
* gcc.dg/pr35742.c: New test.
......
// PR c++/35335
// { dg-do compile }
// { dg-options "" }
// { dg-bogus "not supported by" "" { target *-*-* } 0 }
struct A {}; // { dg-message "note: candidates are" }
void
foo ()
{
A a;
a = ({ { 1; } }); // { dg-error "no match for" }
}
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment