Impala Public Jenkins has submitted this change and it was merged. ( 
http://gerrit.cloudera.org:8080/11811 )

Change subject: IMPALA-5031: Zero-length arrays are undefined behavior
......................................................................

IMPALA-5031: Zero-length arrays are undefined behavior

This patch prevents the creation of a zero-length array. This is
illegal under paragraph 5 of §6.7.5.2 ("Array declarators") of the C99
standard, which reads:

  If the size is an expression that is not an integer constant
  expression: if it occurs in a declaration at function prototype
  scope, it is treated as if it were replaced by *; otherwise, each
  time it is evaluated it shall have a value greater than zero.

Variable-length arrays are not part of C++14, but they are a common
compiler extension and are available in both clang++ and g++. That the
semantics of missing features are the same is implied by [intro.scope]
in the C++14 standard, which reads:

  C++ is a general purpose programming language based on the C
  programming language as described in ISO/IEC 9899:1999 Programming
  languages — C (hereinafter referred to as the C standard).

Change-Id: I93f7d0b0506e4b6a2ff3303477d887a428431f96
Reviewed-on: http://gerrit.cloudera.org:8080/11811
Reviewed-by: Impala Public Jenkins <[email protected]>
Tested-by: Impala Public Jenkins <[email protected]>
---
M be/src/runtime/row-batch-serialize-test.cc
1 file changed, 1 insertion(+), 1 deletion(-)

Approvals:
  Impala Public Jenkins: Looks good to me, approved; Verified

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

Gerrit-Project: Impala-ASF
Gerrit-Branch: master
Gerrit-MessageType: merged
Gerrit-Change-Id: I93f7d0b0506e4b6a2ff3303477d887a428431f96
Gerrit-Change-Number: 11811
Gerrit-PatchSet: 4
Gerrit-Owner: Jim Apple <[email protected]>
Gerrit-Reviewer: Impala Public Jenkins <[email protected]>
Gerrit-Reviewer: Jim Apple <[email protected]>
Gerrit-Reviewer: Jinchul Kim <[email protected]>
Gerrit-Reviewer: Lars Volker <[email protected]>
Gerrit-Reviewer: Tim Armstrong <[email protected]>

Reply via email to