This is the mail archive of the
mailing list for the GCC project.
Re: PING: [C PATCH] Various c_do_switch_warnings improvements
- From: Gabriel Dos Reis <gdr at integrable-solutions dot net>
- To: Roger Sayle <roger at eyesopen dot com>
- Cc: gcc-patches at gcc dot gnu dot org, Joseph Myers <joseph at codesourcery dot com>
- Date: 24 Aug 2006 22:36:21 +0200
- Subject: Re: PING: [C PATCH] Various c_do_switch_warnings improvements
- References: <Pine.LNX.firstname.lastname@example.org>
Roger Sayle <email@example.com> writes:
| On Sat, 8 Jul 2006, Roger Sayle wrote:
| > 2006-07-08 Roger Sayle <firstname.lastname@example.org>
| > * tree.h (CASE_LOW_SEEN, CASE_HIGH_SEEN): New macros for manipulating
| > temporary visit flags on CASE_LABEL_EXPRs.
| > * c-common.c (match_case_to_enum): Add function comment. Avoid
| > O(N) loop, by looking up both CASE_LOW_SEEN and CASE_HIGH_SEEN.
| > (c_do_switch_warnings): Reorganize to record CASE_LOW_SEEN and
| > CASE_HIGH_SEEN for enumerated types. If the switch expression is
| > a constant, only warn if that constant value isn't handled.
| > * gcc.dg/Wswitch-enum-2.c: New test case.
| > * gcc.dg/Wswitch-enum-3.c: Likewise.
| Basically a diagnostic regression fix, removal of a quadratic loop in
| the C front-end to speed up the compiler, and a code clean-up to avoid
| undocumented use of tree_common bits. Unfortunately, summer vacations
| have resulted in this going for over a month without comment and not
| being pinged earlier.
| I've rebootstrapped and regression tested the patch and testcases on
| x86_64-unknown-linux-gnu against 20060822 mainline, again with no new
This is OK by me, but I don't know how much of it is C-maintainer
garden and how much I can approve of it.