On Sun, Apr 20, 2008 at 12:27:38PM -0400, Tom Lane wrote:
> Sam Mason <[EMAIL PROTECTED]> writes:
> > Wouldn't it be easy to put some code like this in:
> > if (arg2 < 16)
> > return PG_RETURN_INT16(arg1 << arg2);
> > return PG_RETURN_INT16(0);
>
> This is a straw man. It covers *one* of
Tom Lane wrote:
> And I still find the premise entirely unconvincing.
> Maybe the user *wants* to see the local behavior of shift, whatever
> it might be. It's certainly not impossible that we'd break applications
> that worked fine before (at least on the hardware they were being
> used on).
Cer
Sam Mason <[EMAIL PROTECTED]> writes:
> Wouldn't it be easy to put some code like this in:
> if (arg2 < 16)
> return PG_RETURN_INT16(arg1 << arg2);
> return PG_RETURN_INT16(0);
This is a straw man. It covers *one* of the behaviors left undefined
by the C standard. I quote from C99:
On Sat, Apr 19, 2008 at 11:26:57AM -0400, Tom Lane wrote:
> Roman Kononov <[EMAIL PROTECTED]> writes:
> > The below test cases show the obvious inconsistency between different
> > integer types.
>
> [ shrug... ] The << and >> operators just expose the behavior of the
> local C compiler's shift o
Roman Kononov <[EMAIL PROTECTED]> writes:
> The below test cases show the obvious inconsistency between different
> integer types.
[ shrug... ] The << and >> operators just expose the behavior of the
local C compiler's shift operators, and it's clearly stated in the C
spec that shifting by more