forked from gcc-mirror/gcc
-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
PR c++/37646 * tree.c (lvalue_p_1): Handle BASELINK. A COMPONENT_REF to a function isn't necessarily an lvalue. Take tree, not const_tree. (lvalue_p, real_lvalue_p): Take tree, not const_tree. * typeck.c (lvalue_or_else): Likewise. * cp-tree.h: Adjust prototypes. git-svn-id: svn+ssh://gcc.gnu.org/svn/gcc/trunk@143404 138bc75d-0d04-0410-961f-82ee72b054a4
- Loading branch information
jason
committed
Jan 15, 2009
1 parent
c2bfeae
commit db9317c
Showing
7 changed files
with
75 additions
and
12 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,26 @@ | ||
// PR c++/36334 | ||
|
||
struct X | ||
{ | ||
typedef int* foobar(); | ||
static void foo(foobar&); | ||
}; | ||
|
||
void X::foo(foobar&) | ||
{ | ||
} | ||
|
||
struct Y : public X | ||
{ | ||
static foobar bar; | ||
static void foo(); | ||
}; | ||
|
||
void Y::foo() | ||
{ | ||
X::foo(bar); | ||
} | ||
int* Y::bar() | ||
{ | ||
return 0; | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,11 @@ | ||
// PR c++/37646 | ||
|
||
struct A | ||
{ | ||
void foo(); | ||
|
||
void bar(int i) | ||
{ | ||
void (*p)() = i ? foo : foo; // { dg-error "invalid use of member" } | ||
} | ||
}; |