This is the mail archive of the
gcc-cvs@gcc.gnu.org
mailing list for the GCC project.
egcs/gcc ChangeLog c-common.def c-common.h c-t ...
- From: jakub at gcc dot gnu dot org
- To: gcc-cvs at gcc dot gnu dot org
- Date: 4 Feb 2002 22:05:16 -0000
- Subject: egcs/gcc ChangeLog c-common.def c-common.h c-t ...
CVSROOT: /cvs/gcc
Module name: egcs
Changes by: jakub@gcc.gnu.org 2002-02-04 14:05:16
Modified files:
gcc : ChangeLog c-common.def c-common.h c-typeck.c
stmt.c tree.h c-semantics.c
gcc/cp : ChangeLog
gcc/testsuite : ChangeLog
gcc/cp : semantics.c
gcc/doc : c-tree.texi
gcc/testsuite/gcc.dg: Wswitch.c
Added files:
gcc/testsuite/g++.dg/warn: Wswitch-1.C Wswitch-2.C
gcc/testsuite/gcc.dg: Wswitch-2.c
Log message:
PR c/4475, c++/3780:
* c-common.def (SWITCH_STMT): Add SWITCH_TYPE operand.
* c-common.h (SWITCH_TYPE): Define.
* c-typeck.c (c_start_case): Set SWITCH_TYPE.
* stmt.c (all_cases_count): Set lastval to thisval at end of loop.
Rename spareness variable to sparseness.
(expand_end_case_type): Renamed from expand_end_case, use orig_type
if non-NULL instead of TREE_TYPE (orig_index).
* tree.h (expand_end_case_type): Renamed from expand_end_case.
(expand_end_case): Define using expand_end_case_type.
* c-semantics.c (genrtl_switch_stmt): Pass SWITCH_TYPE
to expand_end_case_type.
* doc/c-tree.texi (SWITCH_STMT): Document SWITCH_TYPE.
* semantics.c (begin_switch_stmt): Clear SWITCH_TYPE.
(finish_switch_cond): Set SWITCH_TYPE.
* gcc.dg/Wswitch.c: Fix typos. Don't return unconditionally
before all tests. Move warning one line above to match where it
C frontend emits.
* gcc.dg/Wswitch-2.c: New test.
* g++.dg/warn/Wswitch-1.C: New test.
* g++.dg/warn/Wswitch-2.C: New test.
Patches:
http://gcc.gnu.org/cgi-bin/cvsweb.cgi/egcs/gcc/ChangeLog.diff?cvsroot=gcc&r1=1.12932&r2=1.12933
http://gcc.gnu.org/cgi-bin/cvsweb.cgi/egcs/gcc/c-common.def.diff?cvsroot=gcc&r1=1.9&r2=1.10
http://gcc.gnu.org/cgi-bin/cvsweb.cgi/egcs/gcc/c-common.h.diff?cvsroot=gcc&r1=1.113&r2=1.114
http://gcc.gnu.org/cgi-bin/cvsweb.cgi/egcs/gcc/c-typeck.c.diff?cvsroot=gcc&r1=1.173&r2=1.174
http://gcc.gnu.org/cgi-bin/cvsweb.cgi/egcs/gcc/stmt.c.diff?cvsroot=gcc&r1=1.244&r2=1.245
http://gcc.gnu.org/cgi-bin/cvsweb.cgi/egcs/gcc/tree.h.diff?cvsroot=gcc&r1=1.303&r2=1.304
http://gcc.gnu.org/cgi-bin/cvsweb.cgi/egcs/gcc/c-semantics.c.diff?cvsroot=gcc&r1=1.39&r2=1.40
http://gcc.gnu.org/cgi-bin/cvsweb.cgi/egcs/gcc/cp/ChangeLog.diff?cvsroot=gcc&r1=1.2664&r2=1.2665
http://gcc.gnu.org/cgi-bin/cvsweb.cgi/egcs/gcc/testsuite/ChangeLog.diff?cvsroot=gcc&r1=1.1615&r2=1.1616
http://gcc.gnu.org/cgi-bin/cvsweb.cgi/egcs/gcc/cp/semantics.c.diff?cvsroot=gcc&r1=1.250&r2=1.251
http://gcc.gnu.org/cgi-bin/cvsweb.cgi/egcs/gcc/doc/c-tree.texi.diff?cvsroot=gcc&r1=1.28&r2=1.29
http://gcc.gnu.org/cgi-bin/cvsweb.cgi/egcs/gcc/testsuite/g++.dg/warn/Wswitch-1.C.diff?cvsroot=gcc&r1=NONE&r2=1.1
http://gcc.gnu.org/cgi-bin/cvsweb.cgi/egcs/gcc/testsuite/g++.dg/warn/Wswitch-2.C.diff?cvsroot=gcc&r1=NONE&r2=1.1
http://gcc.gnu.org/cgi-bin/cvsweb.cgi/egcs/gcc/testsuite/gcc.dg/Wswitch-2.c.diff?cvsroot=gcc&r1=NONE&r2=1.1
http://gcc.gnu.org/cgi-bin/cvsweb.cgi/egcs/gcc/testsuite/gcc.dg/Wswitch.c.diff?cvsroot=gcc&r1=1.1&r2=1.2