This is the mail archive of the
mailing list for the GCC project.
Re: [tree-ssa] fix C enum representation
On Mon, Jan 05, 2004 at 04:07:12PM -0700, email@example.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.