+2005-08-25 Nathan Sidwell <nathan@codesourcery.com>
+
+ PR c++/20817
+ * typeck.c (build_x_unary_op): Make sure OFFSET_REF is not for a
+ ->*.
+
2005-08-24 Nathan Sidwell <nathan@codesourcery.com>
PR c++/22454
if (!flag_ms_extensions && TREE_CODE (TREE_TYPE (xarg)) == METHOD_TYPE
&& (TREE_CODE (xarg) != OFFSET_REF || !PTRMEM_OK_P (xarg)))
{
- if (TREE_CODE (xarg) != OFFSET_REF)
+ if (TREE_CODE (xarg) != OFFSET_REF
+ || !TYPE_P (TREE_OPERAND (xarg, 0)))
{
- error ("invalid use of %qE to form a pointer-to-member-function."
- " Use a qualified-id.",
+ error ("invalid use of %qE to form a pointer-to-member-function",
xarg);
+ if (TREE_CODE (xarg) != OFFSET_REF)
+ inform (" a qualified-id is required");
return error_mark_node;
}
else
+2005-08-25 Nathan Sidwell <nathan@codesourcery.com>
+
+ PR c++/20817
+ * g++.old-deja/g++.benjamin/13908.C: Robustify expected error.
+
2005-08-25 Alan Modra <amodra@bigpond.net.au>
* gcc.dg/vect/vect-52.c: Increase b[] and c[] size by one.
{
//-edg: expected member name
//-g++: taking address of bound pointer-to-member expression
- foo = (void*) &(pobj->*pmethod); // { dg-error "" }
+ foo = (void*) &(pobj->*pmethod); // { dg-error "invalid use" }
}