This is the mail archive of the
gcc-patches@gcc.gnu.org
mailing list for the GCC project.
Re: PATCH RFA: Avoid enum bitfield in C++ frontend
- From: Mark Mitchell <mark at codesourcery dot com>
- To: Jason Merrill <jason at redhat dot com>
- Cc: Ian Lance Taylor <iant at google dot com>, gcc-patches at gcc dot gnu dot org
- Date: Thu, 16 Apr 2009 20:39:44 -0700
- Subject: Re: PATCH RFA: Avoid enum bitfield in C++ frontend
- References: <m3k55o8fiv.fsf@google.com> <49E618C2.9070900@redhat.com>
Jason Merrill wrote:
> Ian Lance Taylor wrote:
>> This is how I think the code looks best--I don't see a need for a
>> special type to hold this combination of bitfields. However, it would
>> be a smaller change to let the C++ frontend continue to use
>> tsubst_flags_t, and simply do "typedef int tsubst_flags_t". If the C++
>> frontend maintainers would prefer that patch, I can do that instead.
>
> I think I would prefer that; the typedef provides documentation about
> what the complain parameter means.
FWIW, I agree. I'd rather we used typedefs for basic types more in GCC,
rather than less; it's an easy way to get some self-documentation in the
code. "a_register r" is a lot easier to understand than "int r".
My two cents,
--
Mark Mitchell
CodeSourcery
mark@codesourcery.com
(650) 331-3385 x713