impala-reviews mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "Tim Armstrong (Code Review)" <ger...@cloudera.org>
Subject [Impala-ASF-CR] IMPALA-5031: Remove undefined behavior: left shift into the sign bit
Date Mon, 03 Apr 2017 16:33:00 GMT
Tim Armstrong has posted comments on this change.

Change subject: IMPALA-5031: Remove undefined behavior: left shift into the sign bit
......................................................................


Patch Set 1:

(2 comments)

Thanks for fixing this!

http://gerrit.cloudera.org:8080/#/c/6528/1/be/src/exprs/bit-byte-functions-ir.cc
File be/src/exprs/bit-byte-functions-ir.cc:

Line 151:   return (static_cast<std::make_unsigned_t<T>>(v) << shift)
> In ExprTest.BitByteBuiltins:
There's an implicit conversion back to the signed return type. I think it would be clearer
if that was explicit.


Line 170:   return static_cast<std::make_unsigned_t<T>>(v) << shift;
> In ExprTest.BitByteBuiltins:
Same here


-- 
To view, visit http://gerrit.cloudera.org:8080/6528
To unsubscribe, visit http://gerrit.cloudera.org:8080/settings

Gerrit-MessageType: comment
Gerrit-Change-Id: I748697cf503e9e717a6e95250c2cbbf031c6352d
Gerrit-PatchSet: 1
Gerrit-Project: Impala-ASF
Gerrit-Branch: master
Gerrit-Owner: Jim Apple <jbapple-impala@apache.org>
Gerrit-Reviewer: Jim Apple <jbapple-impala@apache.org>
Gerrit-Reviewer: Lars Volker <lv@cloudera.com>
Gerrit-Reviewer: Tim Armstrong <tarmstrong@cloudera.com>
Gerrit-HasComments: Yes

Mime
View raw message