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++/23491] [4.0/4.1 Regression] new declarator with constant expression gives "error: invalid use of array with unspecified bounds"


------- Additional Comments From cvs-commit at gcc dot gnu dot org  2005-08-26 19:33 -------
Subject: Bug 23491

CVSROOT:	/cvs/gcc
Module name:	gcc
Changes by:	mmitchel@gcc.gnu.org	2005-08-26 19:32:31

Modified files:
	gcc/cp         : ChangeLog cp-tree.h init.c typeck.c 
	gcc/testsuite  : ChangeLog 
	gcc/testsuite/g++.dg/expr: anew1.C anew2.C anew3.C 
Added files:
	gcc/testsuite/g++.dg/init: new14.C 

Log message:
	PR c++/23491
	* cp-tree.h (build_vec_init): Adjust prototype.
	* init.c (perform_member_init): Adjust call to build_vec_init.
	(build_aggr_init): Likewise.
	(build_new_1): Do not call build_default_init for array types.
	(build_vec_init): Add explicit_default_init_p parameter.  Perform
	default initialization of vector elements when set.
	* typeck.c (build_modify_expr): Adjust call to build_vec_init.
	
	PR c++/23491
	* g++.dg/init/new14.C: New test.
	* g++.dg/expr/anew1.C: Do not XFAIL.
	* g++.dg/expr/anew2.C: Likewise.
	* g++.dg/expr/anew3.C: Likewise.

Patches:
http://gcc.gnu.org/cgi-bin/cvsweb.cgi/gcc/gcc/cp/ChangeLog.diff?cvsroot=gcc&r1=1.4859&r2=1.4860
http://gcc.gnu.org/cgi-bin/cvsweb.cgi/gcc/gcc/cp/cp-tree.h.diff?cvsroot=gcc&r1=1.1158&r2=1.1159
http://gcc.gnu.org/cgi-bin/cvsweb.cgi/gcc/gcc/cp/init.c.diff?cvsroot=gcc&r1=1.426&r2=1.427
http://gcc.gnu.org/cgi-bin/cvsweb.cgi/gcc/gcc/cp/typeck.c.diff?cvsroot=gcc&r1=1.648&r2=1.649
http://gcc.gnu.org/cgi-bin/cvsweb.cgi/gcc/gcc/testsuite/ChangeLog.diff?cvsroot=gcc&r1=1.5964&r2=1.5965
http://gcc.gnu.org/cgi-bin/cvsweb.cgi/gcc/gcc/testsuite/g++.dg/init/new14.C.diff?cvsroot=gcc&r1=NONE&r2=1.1
http://gcc.gnu.org/cgi-bin/cvsweb.cgi/gcc/gcc/testsuite/g++.dg/expr/anew1.C.diff?cvsroot=gcc&r1=1.3&r2=1.4
http://gcc.gnu.org/cgi-bin/cvsweb.cgi/gcc/gcc/testsuite/g++.dg/expr/anew2.C.diff?cvsroot=gcc&r1=1.3&r2=1.4
http://gcc.gnu.org/cgi-bin/cvsweb.cgi/gcc/gcc/testsuite/g++.dg/expr/anew3.C.diff?cvsroot=gcc&r1=1.3&r2=1.4



-- 


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


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