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] fix C enum representation


On Mon, Jan 05, 2004 at 04:07:12PM -0700, law@redhat.com wrote:
> Note you can probably clean up a long standing minor turd in shorten_compare
> as well:
> 
>       /* In C, if TYPE is an enumeration, then we need to get its
>          min/max values from it's underlying integral type, not the
>          enumerated type itself.  In C++, TYPE_MAX_VALUE and
>          TYPE_MIN_VALUE have already been set correctly on the
>          enumeration type.  */
>       if (!c_dialect_cxx() && TREE_CODE (type) == ENUMERAL_TYPE)
>         type = c_common_type_for_size (TYPE_PRECISION (type), unsignedp0);

Missed that one.  I do still need to remove the cast that we had
been inserting in the front end.


r~


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