This is the mail archive of the
gcc-patches@gcc.gnu.org
mailing list for the GCC project.
Re: Bit-field patch, resurrected
- From: Richard Henderson <rth at redhat dot com>
- To: "Joseph S. Myers" <jsm at polyomino dot org dot uk>
- Cc: gcc-patches at gcc dot gnu dot org
- Date: Thu, 1 Apr 2004 14:55:30 -0800
- Subject: Re: Bit-field patch, resurrected
- References: <Pine.LNX.4.58.0403162148050.24060@digraph.polyomino.org.uk>
On Tue, Mar 16, 2004 at 09:50:14PM +0000, Joseph S. Myers wrote:
> + /* For ENUMERAL_TYPEs, must check the mode of the types, not the precision;
> + in C++ they have precision set to match their range, but may use a wider
> mode to match an ABI. If we change modes, we may wind up with bad
> + conversions. For INTEGER_TYPEs, must check the precision as well, so
> + as to yield correct results for bit-field types. */
> + mode_only_needed = (TREE_CODE (type) == ENUMERAL_TYPE);
How does this interact with the enum bitfield extension?
> +#define LANG_HOOKS_REDUCE_BIT_FIELD_OPERATIONS false
Is this really the correct default? I guess it's the safe one for now,
but I would expect that *any* language that sets TYPE_PRECISION small
would want the semantics controlled by this flag.
r~