mirror of
git://gcc.gnu.org/git/gcc.git
synced 2024-12-18 08:59:05 +08:00
re PR c++/29016 (tree check: expected class 'expression', have 'exceptional' (baselink) in get_base_var, at ipa-utils.c:224)
PR c++/29016 * typeck.c (build_unary_op): Don't form an ADDR_EXPR around a BASELINK. PR c++/29016 * g++.dg/init/ptrfn1.C: New test. From-SVN: r117123
This commit is contained in:
parent
2801ed8e2f
commit
b76d34e959
@ -1,3 +1,9 @@
|
||||
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
|
||||
|
@ -4311,6 +4311,10 @@ build_unary_op (enum tree_code code, tree xarg, int noconvert)
|
||||
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;
|
||||
|
@ -1,3 +1,8 @@
|
||||
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
|
||||
|
12
gcc/testsuite/g++.dg/init/ptrfn1.C
Normal file
12
gcc/testsuite/g++.dg/init/ptrfn1.C
Normal file
@ -0,0 +1,12 @@
|
||||
// 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};
|
||||
|
Loading…
Reference in New Issue
Block a user