This is the mail archive of the gdb-patches@sourceware.org mailing list for the GDB 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] p-exp.y: Typecast left operand of BINOP_DIV to long double


On Fri, Feb 01, 2008 at 08:28:52AM +0100, Pierre Muller wrote:
> > It looks OK to me.  Does the type of the left operand completely
> > determine the type of the operation, or do you need to worry about the
> > type of the right-hand exp too before you cast?
> 
>   But how can I do this?
> It is still not really clear to me how I can 
> insert a typecast to left operand, only after
> right operand has been parsed. 
>   It would indeed be better to only do the typecast if both are integral
> types.

You could cast the right operand instead; wouldn't that work?

-- 
Daniel Jacobowitz
CodeSourcery


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