On Fri, Aug 23, 2013 at 11:58:21AM -0400, Carlos O'Donell wrote:
Looks good to me.
A couple of nits:
(a) Could any program possibly expect `val1 - val2' to be the magnitude
of the difference and use that information for anything meaningful?
I doubt it. The standard is sufficiently vague that it shouldn't
be a problem and I've never seen code that expects this.
Imagine two strings where the first string starts with 'a' and the
second string that has 0xffff '+' and then a 'b'. Here val1 - val2
will exceed sizeof(int32_t).
(b) Test case? QE is going to have a hard time testing this without
one.
There's an xtest that I added to the upstream testsuite but not here
because we don't run xtests anyway. Besides that test is bound to
cause havoc on the build system so we're better off having QE run it
manually instead. I'll post the test case on the bugzilla. Does that
sound OK?
Siddhesh