This is the mail archive of the gcc-patches@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]

Re: [tree-ssa] gimp vs expand_end_case_type


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


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