[Date Prev][Date Next] [Thread Prev][Thread Next] [Date Index] [Thread Index]

[Bug c++/22132] [4.0/4.1 Regression] Wrong code: upcasting a const class pointer to struct the class derives from (C/old-style cast)



------- Additional Comments From cvs-commit at gcc dot gnu dot org  2005-08-03 02:17 -------
Subject: Bug 22132

CVSROOT:	/cvs/gcc
Module name:	gcc
Branch: 	apple-local-200502-branch
Changes by:	mrs@gcc.gnu.org	2005-08-03 02:17:44

Modified files:
	gcc/cp         : call.c ChangeLog cp-tree.h typeck.c 
Added files:
	gcc/testsuite/g++.dg/expr: cast4.C 

Log message:
	PR c++/22132
	* call.c (implicit_conversion): Add c_cast_p parameter.
	(standard_conversion): Likewise.  Allow conversions between
	differently-qualified pointer types when performing a C-style
	cast.
	(add_function_candidate): Adjust callee.
	(build_builtin_candidate): Likewise.
	(build_user_type_conversion_1): Likewise.
	(conditional_conversion): Likewise.
	(can_convert_arg): Likewise.
	(can_convert_arg_bad): Likewise.
	(perform_implicit_conversion): Likewise.
	* cp-tree.h (comp_ptr_ttypes_const): Declare.
	* typeck.c (comp_ptr_ttypes_const): Give it external linkage.
	Return bool.
	Radar 4076725

Patches:
http://gcc.gnu.org/cgi-bin/cvsweb.cgi/gcc/gcc/cp/call.c.diff?cvsroot=gcc&only_with_tag=apple-local-200502-branch&r1=1.530.4.5&r2=1.530.4.6
http://gcc.gnu.org/cgi-bin/cvsweb.cgi/gcc/gcc/cp/ChangeLog.diff?cvsroot=gcc&only_with_tag=apple-local-200502-branch&r1=1.4631.2.7&r2=1.4631.2.8
http://gcc.gnu.org/cgi-bin/cvsweb.cgi/gcc/gcc/cp/cp-tree.h.diff?cvsroot=gcc&only_with_tag=apple-local-200502-branch&r1=1.1104.2.8&r2=1.1104.2.9
http://gcc.gnu.org/cgi-bin/cvsweb.cgi/gcc/gcc/cp/typeck.c.diff?cvsroot=gcc&only_with_tag=apple-local-200502-branch&r1=1.614.2.14&r2=1.614.2.15
http://gcc.gnu.org/cgi-bin/cvsweb.cgi/gcc/gcc/testsuite/g++.dg/expr/cast4.C.diff?cvsroot=gcc&only_with_tag=apple-local-200502-branch&r1=NONE&r2=1.1.14.1



-- 


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

------- You are receiving this mail because: -------
You are on the CC list for the bug, or are watching someone who is.



Reply to: