This is the mail archive of the
gcc-patches@gcc.gnu.org
mailing list for the GCC project.
Re: [tree-ssa] gimp vs expand_end_case_type
- From: Jason Merrill <jason at redhat dot com>
- To: Richard Henderson <rth at redhat dot com>
- Cc: gcc-patches at gcc dot gnu dot org
- Date: Wed, 03 Sep 2003 14:25:33 -0400
- Subject: Re: [tree-ssa] gimp vs expand_end_case_type
- References: <20030903075414.GA6198@redhat.com>
On Wed, 3 Sep 2003 00:54:14 -0700, Richard Henderson <rth@redhat.com> wrote:
> The problem is, the cast here isn't completely unnecessary.
> The exact type of the expression Means Things to the code that
> expands switch statements.
> Arguably, this is wrong, and we should store this type somewhere else.
I would argue that the problem is the C frontend giving an incorrect value
for TYPE_MAX_VALUE of enums. The C++ frontend uses the actual range of
values an object of the type can have; your testcase demonstrates why the C
practice of only describing the range of named enums is wrong.
Jason