ZhangHuiGui opened a new issue, #40913:
URL: https://github.com/apache/arrow/issues/40913

   ### Describe the bug, including details regarding any error messages, 
version, and platform.
   
   When i compile recently arrow with :
   ```shell
   gcc:  gcc version 9.3.0 (Ubuntu 9.3.0-1ubuntu1~20.04.3)
   arrow: 9f0101ec14336b2baad45d57320fb56c71d9321b
   ```
   A warning reported as below:
   ```shell
   /home/gpadmin/pie-db/arrow/cpp/src/parquet/encoding_benchmark.cc: In 
instantiation of ‘static constexpr 
parquet::ByteStreamSplitDummyValue<std::array<_Tp, _Nm> >::Array 
parquet::ByteStreamSplitDummyValue<std::array
   <_Tp, _Nm> >::value() [with T = signed char; long unsigned int N = 16; 
parquet::ByteStreamSplitDummyValue<std::array<_Tp, _Nm> >::Array = 
std::array<signed char, 16>]’:
   /home/gpadmin/pie-db/arrow/cpp/src/parquet/encoding_benchmark.cc:385:82:   
required from ‘void parquet::BM_ByteStreamSplitDecode(benchmark::State&, 
DecodeFunc&&) [with T = std::array<signed char, 16>; DecodeFunc =
   void (&)(const unsigned char*, int, long int, long int, unsigned char*)]’
   /home/gpadmin/pie-db/arrow/cpp/src/parquet/encoding_benchmark.cc:426:50:   
required from ‘void 
parquet::BM_ByteStreamSplitDecode_FLBA_Generic(benchmark::State&) [with int N = 
16]’
   /home/gpadmin/pie-db/arrow/cpp/src/parquet/encoding_benchmark.cc:473:1:   
required from here
   /usr/include/c++/9/array:94:12: note: ‘using Array = struct 
std::array<signed char, 16>’ {aka ‘struct std::array<signed char, 16>’} has no 
user-provided default constructor
      94 |     struct array
         |            ^~~~~
   /usr/include/c++/9/array:110:56: note: and the implicitly-defined 
constructor does not initialize ‘signed char std::array<signed char, 
16>::_M_elems [16]’
   ```
   
   Seems my gcc version `9.3` not support detect the fact we want to assign 
values to the constexpr. But the warning can't be  reproduced in higher gcc 
version.
   
https://github.com/apache/arrow/blob/9f0101ec14336b2baad45d57320fb56c71d9321b/cpp/src/parquet/encoding_benchmark.cc#L375
   
   For this warning, we need add `Array array {}`.
   
   ### Component(s)
   
   C++


-- 
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

To unsubscribe, e-mail: [email protected]

For queries about this service, please contact Infrastructure at:
[email protected]

Reply via email to