This is the mail archive of the gcc-bugs@gcc.gnu.org mailing list for the GCC project.


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]
Other format: [Raw text]

[Bug c++/2204] G++ doesn't check (member) function parameter for abstract-ness.


------- Additional Comments From cvs-commit at gcc dot gnu dot org  2004-07-12 10:07 -------
Subject: Bug 2204

CVSROOT:	/cvs/gcc
Module name:	gcc
Changes by:	giovannibajo@gcc.gnu.org	2004-07-12 10:07:30

Modified files:
	gcc/cp         : ChangeLog config-lang.in Make-lang.in cp-tree.h 
	                 typeck2.c decl.c class.c 
	gcc/testsuite  : ChangeLog 
Added files:
	gcc/testsuite/g++.dg/other: abstract2.C 

Log message:
	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.

Patches:
http://gcc.gnu.org/cgi-bin/cvsweb.cgi/gcc/gcc/cp/ChangeLog.diff?cvsroot=gcc&r1=1.4188&r2=1.4189
http://gcc.gnu.org/cgi-bin/cvsweb.cgi/gcc/gcc/cp/config-lang.in.diff?cvsroot=gcc&r1=1.22&r2=1.23
http://gcc.gnu.org/cgi-bin/cvsweb.cgi/gcc/gcc/cp/Make-lang.in.diff?cvsroot=gcc&r1=1.187&r2=1.188
http://gcc.gnu.org/cgi-bin/cvsweb.cgi/gcc/gcc/cp/cp-tree.h.diff?cvsroot=gcc&r1=1.1001&r2=1.1002
http://gcc.gnu.org/cgi-bin/cvsweb.cgi/gcc/gcc/cp/typeck2.c.diff?cvsroot=gcc&r1=1.163&r2=1.164
http://gcc.gnu.org/cgi-bin/cvsweb.cgi/gcc/gcc/cp/decl.c.diff?cvsroot=gcc&r1=1.1242&r2=1.1243
http://gcc.gnu.org/cgi-bin/cvsweb.cgi/gcc/gcc/cp/class.c.diff?cvsroot=gcc&r1=1.628&r2=1.629
http://gcc.gnu.org/cgi-bin/cvsweb.cgi/gcc/gcc/testsuite/ChangeLog.diff?cvsroot=gcc&r1=1.3988&r2=1.3989
http://gcc.gnu.org/cgi-bin/cvsweb.cgi/gcc/gcc/testsuite/g++.dg/other/abstract2.C.diff?cvsroot=gcc&r1=NONE&r2=1.1



-- 


http://gcc.gnu.org/bugzilla/show_bug.cgi?id=2204


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]