Commit 39e837db by Paolo Bonzini

==> cp/ChangeLog <==

2005-10-12  Paolo Bonzini  <bonzini@gnu.org>

	PR c++/24052
	* error.c (dump_expr): Pass LABEL_DECL to dump_decl.  Print
	an ADDR_EXPR of a LABEL_DECL as &&.

==> testsuite/ChangeLog <==
2005-10-12  Paolo Bonzini  <bonzini@gnu.org>

	PR c++/24052
	* g++.dg/ext/label5.C: New.

From-SVN: r105297
parent c8c7ed52
2005-10-12 Paolo Bonzini <bonzini@gnu.org>
PR c++/24052
* error.c (dump_expr): Pass LABEL_DECL to dump_decl. Print
an ADDR_EXPR of a LABEL_DECL as &&.
2005-10-12 Nathan Sidwell <nathan@codesourcery.com>
PR c++/19964
* cp/class.c (walk_subobject_offsets): Don't walk error_mark_node.
* class.c (walk_subobject_offsets): Don't walk error_mark_node.
2005-10-11 Ian Lance Taylor <ian@airs.com>
......
......@@ -1295,6 +1295,7 @@ dump_expr (tree t, int flags)
case FUNCTION_DECL:
case TEMPLATE_DECL:
case NAMESPACE_DECL:
case LABEL_DECL:
case OVERLOAD:
case IDENTIFIER_NODE:
dump_decl (t, (flags & ~TFF_DECL_SPECIFIERS) | TFF_NO_FUNCTION_ARGUMENTS);
......@@ -1537,6 +1538,8 @@ dump_expr (tree t, int flags)
|| (TREE_TYPE (t)
&& TREE_CODE (TREE_TYPE (t)) == REFERENCE_TYPE))
dump_expr (TREE_OPERAND (t, 0), flags | TFF_EXPR_IN_PARENS);
else if (TREE_CODE (TREE_OPERAND (t, 0)) == LABEL_DECL)
dump_unary_op ("&&", t, flags);
else
dump_unary_op ("&", t, flags);
break;
......
2005-10-12 Paolo Bonzini <bonzini@gnu.org>
PR c++/24052
* g++.dg/ext/label5.C: New.
2005-10-12 Nathan Sidwell <nathan@codesourcery.com>
PR c++/19964
// { dg-options "" }
// PR c++/24052
struct A { };
int main() { b: A() && && b; } // { dg-error "A\\(\\) && && *b" }
// { dg-error "candidate" "additional" { target *-*-* } 5 }
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