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++/11512] [3.4 Regression] Spurious warning for comma-operator in templates


PLEASE REPLY TO gcc-bugzilla@gcc.gnu.org ONLY, *NOT* gcc-bugs@gcc.gnu.org.

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



------- Additional Comments From cvs-commit at gcc dot gnu dot org  2003-08-16 13:32 -------
Subject: Bug 11512

CVSROOT:	/cvs/gcc
Module name:	gcc
Changes by:	nathan@gcc.gnu.org	2003-08-16 13:32:12

Modified files:
	gcc            : stmt.c ChangeLog 
	gcc/cp         : ChangeLog cvt.c init.c typeck.c 
	gcc/testsuite  : ChangeLog 
Added files:
	gcc/testsuite/g++.dg/template: warn1.C 

Log message:
	PR c++/11512
	* stmt.c (expand_expr_stmt_value): Don't warn about any void
	typed expression.
	cp:
	PR c++/11512
	* cvt.c (convert_to_void): Indicate which side of conditional has
	no effects, and rhs of comma operator. Test for no sideeffect
	expressions here and always build a convert expr.
	* init.c (expand_default_init): Convert the init to void.
	* typeck.c (build_x_compound_expr): Do not check for side effects
	here.
	(build_compound_expr): Do not convert lhs when building a
	template.
	testsuite:
	PR C++/11512
	* g++.dg/template/warn1.C: New.

Patches:
http://gcc.gnu.org/cgi-bin/cvsweb.cgi/gcc/gcc/stmt.c.diff?cvsroot=gcc&r1=1.324&r2=1.325
http://gcc.gnu.org/cgi-bin/cvsweb.cgi/gcc/gcc/ChangeLog.diff?cvsroot=gcc&r1=2.787&r2=2.788
http://gcc.gnu.org/cgi-bin/cvsweb.cgi/gcc/gcc/cp/ChangeLog.diff?cvsroot=gcc&r1=1.3603&r2=1.3604
http://gcc.gnu.org/cgi-bin/cvsweb.cgi/gcc/gcc/cp/cvt.c.diff?cvsroot=gcc&r1=1.143&r2=1.144
http://gcc.gnu.org/cgi-bin/cvsweb.cgi/gcc/gcc/cp/init.c.diff?cvsroot=gcc&r1=1.337&r2=1.338
http://gcc.gnu.org/cgi-bin/cvsweb.cgi/gcc/gcc/cp/typeck.c.diff?cvsroot=gcc&r1=1.492&r2=1.493
http://gcc.gnu.org/cgi-bin/cvsweb.cgi/gcc/gcc/testsuite/ChangeLog.diff?cvsroot=gcc&r1=1.2972&r2=1.2973
http://gcc.gnu.org/cgi-bin/cvsweb.cgi/gcc/gcc/testsuite/g++.dg/template/warn1.C.diff?cvsroot=gcc&r1=NONE&r2=1.1


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