* typeck.c (build_unary_op): Don't form an ADDR_EXPR around a
BASELINK.
PR c++/29016
* g++.dg/init/ptrfn1.C: New test.
git-svn-id: svn+ssh://gcc.gnu.org/svn/gcc/trunk@117123
138bc75d-0d04-0410-961f-
82ee72b054a4
+2006-09-21 Mark Mitchell <mark@codesourcery.com>
+
+ PR c++/29016
+ * typeck.c (build_unary_op): Don't form an ADDR_EXPR around a
+ BASELINK.
+
2006-09-21 Lee Millward <lee.millward@codesourcery.com>
PR c++/28861
pedwarn ("ISO C++ forbids taking the address of a cast to a non-lvalue expression");
break;
+ case BASELINK:
+ arg = BASELINK_FUNCTIONS (arg);
+ /* Fall through. */
+
case OVERLOAD:
arg = OVL_CURRENT (arg);
break;
+2006-09-21 Mark Mitchell <mark@codesourcery.com>
+
+ PR c++/29016
+ * g++.dg/init/ptrfn1.C: New test.
+
2006-09-21 Lee Millward <lee.millward@codesourcery.com>
PR c++/28861
--- /dev/null
+// PR c++/29016
+// { dg-options "-O2" }
+
+class A;
+class B
+{
+ typedef void (*C[5]) (A *);
+ static C D;
+ static void E (A*) {}
+};
+B::C B::D={E};
+