This is the mail archive of the
gcc-patches@gcc.gnu.org
mailing list for the GCC project.
Re: wider-than-int enums broken in C++
On Wed, 2003-07-23 at 21:36, Jason Merrill wrote:
> On 23 Jul 2003 23:50:15 -0300, Alexandre Oliva <aoliva@redhat.com> wrote:
>
> > Your patch for PR 10796, that implemented C++ DR377, also contained a
> > code clean-up that was actually wrong. The underlying type of an enum
> > must be an integral type, but, after your patch, we end up with a type
> > whose precision is given by the min and max values of the enumeration,
> > that doesn't necessarily match the precision of any of the integral
> > types.
>
> How did this break the testcase? I thought the point of TYPE_PRECISION was
> to describe the expressible values. We set TYPE_PRECISION to 1 for bool
> even though we allocate more than one bit for it.
That was my understanding as well.
Alexandre, can you explain what is going on here in more detail?
--
Mark Mitchell
CodeSourcery, LLC
mark@codesourcery.com