re PR c++/2204 (G++ doesn't check (member) function parameter for abstract-ness.)
authorGiovanni Bajo <giovannibajo@gcc.gnu.org>
Mon, 12 Jul 2004 10:07:30 +0000 (10:07 +0000)
committerGiovanni Bajo <giovannibajo@gcc.gnu.org>
Mon, 12 Jul 2004 10:07:30 +0000 (10:07 +0000)
commit7fb213d8e955ed3f21defe0d28ab63fe576574bd
treeddb750a9ae79ad0985920a74ed9e30cdf7fa664a
parentb55e3aad633bd6e8de2b41b1a6ce41e5241878ac
re PR c++/2204 (G++ doesn't check (member) function parameter for abstract-ness.)

PR c++/2204
* config-lang.in (gtfiles): Add typeck2.c.
* Make-lang.in: Tweak typeck2.c dependencies, and add rule for
gt-cp-typeck2.h.
* cp-tree.h: Declare complete_type_check_abstract.
* typeck2.c (pat_calc_hash, pat_compare,
complete_type_check_abstract): New functions.
(abstract_virtuals_error): If the type is abstract, register the
declaration within abstract_pending_vars for further checks.
Inspect also dependent types. Handle IDENTIFIER_NODEs as decl.
* decl.c (cp_finish_decl): Do not strip array types.
(create_array_type_for_decl): Check for abstractness of the element
type.
(complete_vars): Call complete_type_check_abstract.
* class.c (finish_struct): Prepare a list of virtual functions for
template types, and call complete_vars on it to check for abstractness.

PR c++/2204
* g++.dg/other/abstract2.C: New test.

From-SVN: r84552
gcc/cp/ChangeLog
gcc/cp/Make-lang.in
gcc/cp/class.c
gcc/cp/config-lang.in
gcc/cp/cp-tree.h
gcc/cp/decl.c
gcc/cp/typeck2.c
gcc/testsuite/ChangeLog
gcc/testsuite/g++.dg/other/abstract2.C [new file with mode: 0644]