You are viewing a plain text version of this content. The canonical link for it is here.
Posted to issues@arrow.apache.org by "ZhangHuiGui (via GitHub)" <gi...@apache.org> on 2024/03/31 09:16:11 UTC

[I] [C++] Compile encoding_benchmark.cc report warning with 'implicitly-defined constructor does not initialize' [arrow]

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: issues-unsubscribe@arrow.apache.org.apache.org

For queries about this service, please contact Infrastructure at:
users@infra.apache.org


Re: [I] [C++] Compile encoding_benchmark.cc report warning with 'implicitly-defined constructor does not initialize' [arrow]

Posted by "pitrou (via GitHub)" <gi...@apache.org>.
pitrou closed issue #40913: [C++] Compile encoding_benchmark.cc report warning with 'implicitly-defined constructor does not initialize'
URL: https://github.com/apache/arrow/issues/40913


-- 
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: issues-unsubscribe@arrow.apache.org

For queries about this service, please contact Infrastructure at:
users@infra.apache.org


Re: [I] [C++] Compile encoding_benchmark.cc report warning with 'implicitly-defined constructor does not initialize' [arrow]

Posted by "pitrou (via GitHub)" <gi...@apache.org>.
pitrou commented on issue #40913:
URL: https://github.com/apache/arrow/issues/40913#issuecomment-2050112542

   Issue resolved by pull request 41060
   https://github.com/apache/arrow/pull/41060


-- 
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: github-unsubscribe@arrow.apache.org

For queries about this service, please contact Infrastructure at:
users@infra.apache.org