This is the mail archive of the 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: [PATCH] Fix PR optimization/11210

On Sat, 2003-06-28 at 06:01, Eric Botcazou wrote:
>         PR optimization/11210
>         * fold-const (decode_field_reference): Record outermost type in
> 	case the expression is a NOP. Strip all NOPs. Set the signedness
> 	to that of the outermost type (if any) when the bitsize is equal to the
> 	size of the type.

Sorry about the delay and confusion here.  I found this rather non
obvious.  I have managed to convince myself now that this patch is OK,
and that it is the smallest fastest patch that works.

I still don't like the expr.c handled_component_p comment you added.  A
??? comment implies that there is something wrong.  I don't believe
there is anything wrong with get_inner_reference.  If you want to add a
comment to document that TYPE_PRECISION can change even though TYPE_MODE
does not because of how bitfields are represented, then that makes
sense, but it shouldn't be a ??? comment.

I also raised the issue of whether we need to set outer_type in the
BIT_AND_EXPR case, but I can't find any evidence showing that it is
necessary, so the safe thing would be to not change the code here.

So I am approving the fold-const.c part of this patch.  And I am
approving a non-??? comment for handled_component_p that documents that
TYPE_PRECISION can change if we have a bitfield, if you care to write


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