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


In message <wvly8x5wwyq.fsf@prospero.boston.redhat.com>, Jason Merrill writes:
 >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.
In fact, the C front-end's practice of only describing the range of the named
enums has caused problems in the past.

revision 1.52
date: 1999/02/16 00:41:58;  author: law;  state: Exp;  lines: +6 -0
        * c-common.c (shorten_compare): Get the min/max value from the
        underlying type of an enumeration, not the enumerated type itself.


jeff
                                                                                



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