PR c++/43070
* semantics.c (finish_goto_stmt): Don't call decay_conversion.
From-SVN: r156872
2010-02-18 Jason Merrill <jason@redhat.com>
+ PR c++/43070
+ * semantics.c (finish_goto_stmt): Don't call decay_conversion.
+
PR c++/26261
PR c++/43101
* pt.c (tsubst_qualified_id): Do normal lookup in non-dependent scope.
TREE_USED (destination) = 1;
else
{
- /* The DESTINATION is being used as an rvalue. */
if (!processing_template_decl)
{
- destination = decay_conversion (destination);
destination = cp_convert (ptr_type_node, destination);
if (error_operand_p (destination))
return NULL_TREE;
2010-02-18 Jason Merrill <jason@redhat.com>
+ PR c++/43070
+ * g++.dg/ext/label1.C: Update.
+ * g++.dg/ext/label2.C: Update.
+
PR c++/26261
* g++.dg/template/dependent-name6.C: New.
int main(void) {
static const void* lbls[2][2] = {{&&lbl0, &&lbl0}, {&&lbl0, &&lbl0}};
- goto *lbls[0];
+ goto *lbls[0][0];
+ goto *lbls[0][0][0]; // { dg-message "" }
+ goto *lbls[0]; // { dg-error "" }
lbl0:
;
}
l:
void *p[] = { &&l };
- goto *p;
+ goto *p[0];
}
template void f<int>();