re PR c++/50491 ([C++0x] [4.6/4.7 Regression] "unexpected ast of kind using_decl" on call to using'ed grandparent member function)
/cp 2011-09-22 Paolo Carlini <paolo.carlini@oracle.com> PR c++/50491 * semantics.c (potential_constant_expression_1): Handle USING_DECL. /testsuite 2011-09-22 Paolo Carlini <paolo.carlini@oracle.com> PR c++/50491 * g++.dg/cpp0x/pr50491.C: New. From-SVN: r179109
This commit is contained in:
parent
f8b4d70d01
commit
ee71530f56
@ -1,3 +1,8 @@
|
||||
2011-09-22 Paolo Carlini <paolo.carlini@oracle.com>
|
||||
|
||||
PR c++/50491
|
||||
* semantics.c (potential_constant_expression_1): Handle USING_DECL.
|
||||
|
||||
2011-09-22 Paolo Carlini <paolo.carlini@oracle.com>
|
||||
|
||||
PR c++/50371
|
||||
|
@ -7751,6 +7751,7 @@ potential_constant_expression_1 (tree t, bool want_rval, tsubst_flags_t flags)
|
||||
/* We can see a FIELD_DECL in a pointer-to-member expression. */
|
||||
case FIELD_DECL:
|
||||
case PARM_DECL:
|
||||
case USING_DECL:
|
||||
return true;
|
||||
|
||||
case AGGR_INIT_EXPR:
|
||||
|
@ -1,3 +1,8 @@
|
||||
2011-09-22 Paolo Carlini <paolo.carlini@oracle.com>
|
||||
|
||||
PR c++/50491
|
||||
* g++.dg/cpp0x/pr50491.C: New.
|
||||
|
||||
2011-09-22 Steven G. Kargl <kargl@gcc.gnu.org>
|
||||
|
||||
PR testsuite/50487
|
||||
|
17
gcc/testsuite/g++.dg/cpp0x/pr50491.C
Normal file
17
gcc/testsuite/g++.dg/cpp0x/pr50491.C
Normal file
@ -0,0 +1,17 @@
|
||||
// { dg-options "-std=c++0x" }
|
||||
|
||||
struct GrandParent {
|
||||
void *get();
|
||||
};
|
||||
|
||||
template<class OBJ>
|
||||
struct Parent : public GrandParent{
|
||||
};
|
||||
|
||||
template<typename T>
|
||||
struct Child : public Parent<T> {
|
||||
using GrandParent::get;
|
||||
void Foo() {
|
||||
void* ex = get();
|
||||
}
|
||||
};
|
Loading…
Reference in New Issue
Block a user