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: [BUG] BINOP_DIV and ptyp command


On Jan 29, 2008 5:46 AM, Daniel Jacobowitz <drow@false.org> wrote:
> On Mon, Jan 28, 2008 at 09:34:48PM -0800, Doug Evans wrote:
> > On Jan 28, 2008 8:52 PM, Doug Evans <dje@google.com> wrote:
> > > [...]
> > > So it seems like the following is the correct patch.
> >
> > Well, not quite.  Ok to check the appended patch in?
> >
> > Changing the expected result to long makes / and % no longer special -
> > x*y has an expected result of long.
> >
> > One can argue it should be int, but any fix for that is orthogonal to
> > fixing / and % handling.  I think.
>
> If you had to change a testcase to a more wrong answer, then the bug
> isn't orthogonal :-) We should be following C promotion rules, and
> automatically promoting int math to long is incorrect.

I can't tell if that's a fun comment for grin's sake or not.  I can
flip my pedantic bit and argue the same thing.  Obviously "ptype
int+int" is "int".

In this particular case having to hack whatis-exp.exp to "pass" until
the general bug is fixed is ok by me - is anyone relying on ptype 4/2
to be int whereas ptype 4*2 is long?


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