Revert "Fix PR c++/47172"
gcc/cp/ * pt.c (finish_call_expr, dependent_type_p) (type_dependent_expression_p): Revert the previous attempt to fix PR c++/47172. gcc/testsuite/ * g++.dg/template/inherit6.C: Reverted. From-SVN: r170055
This commit is contained in:
parent
61502ca837
commit
1c31ca71a7
5 changed files with 3 additions and 53 deletions
|
@ -1,10 +1,3 @@
|
|||
2011-02-11 Dodji Seketeli <dodji@redhat.com>
|
||||
|
||||
PR c++/47172
|
||||
* pt.c (finish_call_expr): Consider a call expression that has a
|
||||
dependent "this" pointer as being dependent. Add comments.
|
||||
(dependent_type_p, type_dependent_expression_p): Update comments.
|
||||
|
||||
2011-02-09 Jason Merrill <jason@redhat.com>
|
||||
|
||||
* decl.c (cp_make_fname_decl): Set DECL_THIS_STATIC at toplevel.
|
||||
|
|
|
@ -17912,7 +17912,7 @@ dependent_type_p_r (tree type)
|
|||
}
|
||||
|
||||
/* Returns TRUE if TYPE is dependent, in the sense of
|
||||
[temp.dep.type]. Note that a NULL type is considered dependent. */
|
||||
[temp.dep.type]. */
|
||||
|
||||
bool
|
||||
dependent_type_p (tree type)
|
||||
|
@ -18184,10 +18184,7 @@ value_dependent_expression_p (tree expression)
|
|||
}
|
||||
|
||||
/* Returns TRUE if the EXPRESSION is type-dependent, in the sense of
|
||||
[temp.dep.expr]. Note that an expression with no type is
|
||||
considered dependent. Other parts of the compiler arrange for an
|
||||
expression with type-dependent subexpressions to have no type, so
|
||||
this function doesn't have to be fully recursive. */
|
||||
[temp.dep.expr]. */
|
||||
|
||||
bool
|
||||
type_dependent_expression_p (tree expression)
|
||||
|
|
|
@ -2028,20 +2028,8 @@ finish_call_expr (tree fn, VEC(tree,gc) **args, bool disallow_virtual,
|
|||
|
||||
if (processing_template_decl)
|
||||
{
|
||||
/* If the call expression is dependent, build a CALL_EXPR node
|
||||
with no type; type_dependent_expression_p recognizes
|
||||
expressions with no type as being dependent. */
|
||||
if (type_dependent_expression_p (fn)
|
||||
|| any_type_dependent_arguments_p (*args)
|
||||
/* For a non-static member function, we need to specifically
|
||||
test the type dependency of the "this" pointer because it
|
||||
is not included in *ARGS even though it is considered to
|
||||
be part of the list of arguments. Note that this is
|
||||
related to CWG issues 515 and 1005. */
|
||||
|| (TREE_CODE (fn) == FUNCTION_DECL
|
||||
&& DECL_NONSTATIC_MEMBER_FUNCTION_P (fn)
|
||||
&& current_class_ref
|
||||
&& type_dependent_expression_p (current_class_ref)))
|
||||
|| any_type_dependent_arguments_p (*args))
|
||||
{
|
||||
result = build_nt_call_vec (fn, *args);
|
||||
KOENIG_LOOKUP_P (result) = koenig_p;
|
||||
|
|
|
@ -22,11 +22,6 @@
|
|||
* gcc.dg/ucnid-8.c: Likewise.
|
||||
* Adapt dg-warning line number.
|
||||
|
||||
2011-02-11 Dodji Seketeli <dodji@redhat.com>
|
||||
|
||||
PR c++/47172
|
||||
* g++.dg/template/inherit6.C: New test.
|
||||
|
||||
2011-02-10 Uros Bizjak <ubizjak@gmail.com>
|
||||
|
||||
* gcc.target/i386/parity-1.c: Use -march=k8.
|
||||
|
|
|
@ -1,23 +0,0 @@
|
|||
// Origin PR c++/47172
|
||||
// { dg-options "-std=c++0x" }
|
||||
// { dg-do compile }
|
||||
|
||||
struct A
|
||||
{
|
||||
int f() const;
|
||||
};
|
||||
|
||||
template <class T>
|
||||
struct B : A { };
|
||||
|
||||
template <class T>
|
||||
struct C : B<T>
|
||||
{
|
||||
void g();
|
||||
};
|
||||
|
||||
template <class T>
|
||||
void C<T>::g()
|
||||
{
|
||||
A::f();
|
||||
}
|
Loading…
Add table
Reference in a new issue