error.c (dump_function_name): Use DECL_TEMPLATE_RESULT for constructor and destructor tests when...
* error.c (dump_function_name): Use DECL_TEMPLATE_RESULT for constructor and destructor tests when passed a TEMPLATE_DECL. * g++.dg/template/qualttp21.C: New test case. From-SVN: r55304
This commit is contained in:
parent
957ec0f922
commit
78abea278b
|
@ -1,3 +1,8 @@
|
|||
2002-07-07 Roger Sayle <roger@eyesopen.com>
|
||||
|
||||
* error.c (dump_function_name): Use DECL_TEMPLATE_RESULT for
|
||||
constructor and destructor tests when passed a TEMPLATE_DECL.
|
||||
|
||||
2002-07-05 Jason Merrill <jason@redhat.com>
|
||||
|
||||
* cvt.c (cp_convert_to_pointer): Call force_fit_type for null
|
||||
|
|
|
@ -1236,6 +1236,9 @@ dump_function_name (t, flags)
|
|||
{
|
||||
tree name = DECL_NAME (t);
|
||||
|
||||
if (TREE_CODE (t) == TEMPLATE_DECL)
|
||||
t = DECL_TEMPLATE_RESULT (t);
|
||||
|
||||
/* Don't let the user see __comp_ctor et al. */
|
||||
if (DECL_CONSTRUCTOR_P (t)
|
||||
|| DECL_DESTRUCTOR_P (t))
|
||||
|
|
|
@ -1,9 +1,14 @@
|
|||
2002-07-07 Roger Sayle <roger@eyesopen.com>
|
||||
|
||||
* g++.dg/template/qualttp21.C: New test case.
|
||||
|
||||
2002-07-06 Alexandre Oliva <aoliva@redhat.com>
|
||||
|
||||
* gcc.c-torture/compile/20020706-1.c: New test.
|
||||
* gcc.c-torture/compile/20020706-2.c: New test.
|
||||
|
||||
2002-07-06 Brian R. Gaeke <brg@dgate.ORG>, Alexandre Oliva <aoliva@redhat.com>
|
||||
2002-07-06 Brian R. Gaeke <brg@dgate.ORG>
|
||||
Alexandre Oliva <aoliva@redhat.com>
|
||||
|
||||
* g++.dg/warn/incomplete1.C: New test.
|
||||
|
||||
|
|
|
@ -0,0 +1,17 @@
|
|||
// Copyright (C) 2002 Free Software Foundation
|
||||
// Contributed by Roger Sayle <roger@eyesopen.com>
|
||||
// { dg-do compile }
|
||||
|
||||
template <class A>
|
||||
class foo {
|
||||
int _foo;
|
||||
public:
|
||||
foo() {}
|
||||
protected:
|
||||
~foo() {} // { dg-error "~foo" }
|
||||
};
|
||||
|
||||
int main()
|
||||
{
|
||||
foo<int> a; // { dg-error "context" }
|
||||
}
|
Loading…
Reference in New Issue