You are viewing a plain text version of this content. The canonical link for it is here.
Posted to issues@arrow.apache.org by "paleolimbot (via GitHub)" <gi...@apache.org> on 2023/12/08 00:36:03 UTC

[I] [R] Compile with `-Wconversion` on clang15 results in compiler warnings [arrow]

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

   ### Describe the bug, including details regarding any error messages, version, and platform.
   
   As identified by the CRAN M1 check: https://www.stats.ox.ac.uk/pub/bdr/M1mac/arrow.log
   
   A few are in cpp11 headers:
   
   ```
   In file included from /Users/ripley/R/Library/cpp11/include/cpp11/as.hpp:11:
   /Users/ripley/R/Library/cpp11/include/cpp11/protect.hpp:130:29: warning: implicit conversion loses integer precision: 'unsigned long' to 'int' [-Wshorten-64-to-32]
     return std::forward<F>(f)(std::get<I>(std::move(a))...);
            ~~~                ^~~~~~~~~~~~~~~~~~~~~~~~~
   /Users/ripley/R/Library/cpp11/include/cpp11/protect.hpp:136:10: note: in instantiation of function template specialization 'cpp11::detail::apply<SEXPREC *(*&)(const char *, int, cetype_t), const char *&&, unsigned long &&, cetype_t &&, 0UL, 1UL, 2UL>' requested here
     return apply(std::forward<F>(f), std::move(a), make_index_sequence<sizeof...(Aref)>{});
            ^
   /Users/ripley/R/Library/cpp11/include/cpp11/protect.hpp:149:12: note: in instantiation of function template specialization 'cpp11::detail::apply<SEXPREC *(*&)(const char *, int, cetype_t), const char *&&, unsigned long &&, cetype_t &&>' requested here
       return apply(ptr_, std::move(arefs_));
              ^
   /Users/ripley/R/Library/cpp11/include/cpp11/protect.hpp:56:16: note: in instantiation of member function 'cpp11::detail::closure<SEXPREC *(const char *, int, cetype_t), const char *&&, unsigned long &&, cetype_t &&>::operator()' requested here
           return static_cast<Fun&&>(*callback)();
                  ^
   /Users/ripley/R/Library/cpp11/include/cpp11/protect.hpp:163:14: note: in instantiation of function template specialization 'cpp11::unwind_protect<cpp11::detail::closure<SEXPREC *(const char *, int, cetype_t), const char *&&, unsigned long &&, cetype_t &&>, void>' requested here
         return unwind_protect(
                ^
   /Users/ripley/R/Library/cpp11/include/cpp11/r_string.hpp:20:35: note: in instantiation of function template specialization 'cpp11::protect::function<SEXPREC *(const char *, int, cetype_t)>::operator()<const char *, unsigned long, cetype_t>' requested here
         : data_(safe[Rf_mkCharLenCE](data.c_str(), data.size(), CE_UTF8)) {}
                                     ^
   In file included from table.cpp:18:
   ././arrow_types.h:206:16: warning: implicit conversion loses integer precision: 'R_xlen_t' (aka 'long') to 'int' [-Wshorten-64-to-32]
           lambda(j, x_i[k], names_x_i[k]);
           ~~~~~~ ^
   ././arrow_types.h:218:3: note: in instantiation of function template specialization 'arrow::r::TraverseDots<(lambda at ././arrow_types.h:217:14)>' requested here
     TraverseDots(dots, num_fields, set);
     ^
   ././arrow_types.h:209:14: warning: implicit conversion loses integer precision: 'R_xlen_t' (aka 'long') to 'int' [-Wshorten-64-to-32]
         lambda(j, dots[i], name_i);
         ~~~~~~ ^
   ././arrow_types.h:206:16: warning: implicit conversion loses integer precision: 'R_xlen_t' (aka 'long') to 'int' [-Wshorten-64-to-32]
           lambda(j, x_i[k], names_x_i[k]);
           ~~~~~~ ^
   table.cpp:182:13: note: in instantiation of function template specialization 'arrow::r::TraverseDots<(lambda at table.cpp:170:28)>' requested here
     arrow::r::TraverseDots(lst, num_fields, extract_one_field);
               ^
   In file included from table.cpp:18:
   ././arrow_types.h:209:14: warning: implicit conversion loses integer precision: 'R_xlen_t' (aka 'long') to 'int' [-Wshorten-64-to-32]
         lambda(j, dots[i], name_i);
         ~~~~~~ ^
   ././arrow_types.h:206:16: warning: implicit conversion loses integer precision: 'R_xlen_t' (aka 'long') to 'int' [-Wshorten-64-to-32]
           lambda(j, x_i[k], names_x_i[k]);
           ~~~~~~ ^
   table.cpp:213:13: note: in instantiation of function template specialization 'arrow::r::TraverseDots<(lambda at table.cpp:203:31)>' requested here
     arrow::r::TraverseDots(lst, num_fields, extract_one_metadata);
               ^
   In file included from table.cpp:18:
   ././arrow_types.h:209:14: warning: implicit conversion loses integer precision: 'R_xlen_t' (aka 'long') to 'int' [-Wshorten-64-to-32]
         lambda(j, dots[i], name_i);
         ~~~~~~ ^
   22 warnings generated.
   
   In file included from /Users/ripley/R/Library/cpp11/include/cpp11.hpp:5:
   /Users/ripley/R/Library/cpp11/include/cpp11/as.hpp:104:16: warning: implicit conversion turns floating-point number into integer: 'double' to 'enable_if_integral<long long, long long>' (aka 'long long') [-Wfloat-conversion]
           return value;
           ~~~~~~ ^~~~~
   io.cpp:238:25: note: in instantiation of function template specialization 'cpp11::as_cpp<long long>' requested here
             return cpp11::as_cpp<int64_t>(result);
                           ^
   15 warnings generated.
   
   In file included from json.cpp:18:
   In file included from ././arrow_types.h:22:
   In file included from ././arrow_cpp11.h:25:
   In file included from /Users/ripley/R/Library/cpp11/include/cpp11.hpp:7:
   In file included from /Users/ripley/R/Library/cpp11/include/cpp11/data_frame.hpp:12:
   In file included from /Users/ripley/R/Library/cpp11/include/cpp11/list.hpp:7:
   In file included from /Users/ripley/R/Library/cpp11/include/cpp11/named_arg.hpp:9:
   /Users/ripley/R/Library/cpp11/include/cpp11/sexp.hpp:79:36: warning: implicit conversion turns floating-point number into integer: 'double' to 'size_t' (aka 'unsigned long') [-Wfloat-conversion]
     operator size_t() const { return REAL_ELT(data_, 0); }
                               ~~~~~~ ^~~~~~~~~~~~~~~~~~
   In file included from json.cpp:18:
   In file included from ././arrow_types.h:22:
   In file included from ././arrow_cpp11.h:25:
   In file included from /Users/ripley/R/Library/cpp11/include/cpp11.hpp:7:
   /Users/ripley/R/Library/cpp11/include/cpp11/data_frame.hpp:48:14: warning: implicit conversion loses integer precision: 'R_xlen_t' (aka 'long') to 'int' [-Wshorten-64-to-32]
         return Rf_xlength(nms);
         ~~~~~~ ^~~~~~~~~~~~~~~
   /Users/ripley/R/Library/cpp11/include/cpp11/data_frame.hpp:55:12: warning: implicit conversion loses integer precision: 'R_xlen_t' (aka 'long') to 'int' [-Wshorten-64-to-32]
       return Rf_xlength(VECTOR_ELT(x, 0));
       ~~~~~~ ^~~~~~~~~~~~~~~~~~~~~~~~~~~~
   ```
   
   A few are in Arrow C++ headers:
   
   
   ```
   In file included from RTasks.cpp:18:
   In file included from ././r_task_group.h:20:
   In file included from /Users/ripley/R/packages/tests-devel/arrow/libarrow/arrow-14.0.0/include/arrow/util/parallel.h:25:
   In file included from /Users/ripley/R/packages/tests-devel/arrow/libarrow/arrow-14.0.0/include/arrow/util/thread_pool.h:32:
   In file included from /Users/ripley/R/packages/tests-devel/arrow/libarrow/arrow-14.0.0/include/arrow/util/future.h:32:
   In file included from /Users/ripley/R/packages/tests-devel/arrow/libarrow/arrow-14.0.0/include/arrow/type_traits.h:26:
   /Users/ripley/R/packages/tests-devel/arrow/libarrow/arrow-14.0.0/include/arrow/util/bit_util.h:338:84: warning: implicit conversion loses integer precision: 'int' to 'unsigned char' [-Wimplicit-int-conversion]
     return (static_cast<Word>(i < sizeof(Word) * 8) << (i & (sizeof(Word) * 8 - 1))) - 1;
     ~~~~~~ ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~^~~
   /Users/ripley/R/packages/tests-devel/arrow/libarrow/arrow-14.0.0/include/arrow/util/bit_util.h:340:15: note: in instantiation of function template specialization 'arrow::bit_util::PrecedingWordBitmask<unsigned char>' requested here
   static_assert(PrecedingWordBitmask<uint8_t>(0) == 0x00, "");
                 ^
   /Users/ripley/R/packages/tests-devel/arrow/libarrow/arrow-14.0.0/include/arrow/util/bit_util.h:338:84: warning: implicit conversion loses integer precision: 'int' to 'unsigned short' [-Wimplicit-int-conversion]
     return (static_cast<Word>(i < sizeof(Word) * 8) << (i & (sizeof(Word) * 8 - 1))) - 1;
     ~~~~~~ ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~^~~
   /Users/ripley/R/packages/tests-devel/arrow/libarrow/arrow-14.0.0/include/arrow/util/bit_util.h:343:15: note: in instantiation of function template specialization 'arrow::bit_util::PrecedingWordBitmask<unsigned short>' requested here
   static_assert(PrecedingWordBitmask<uint16_t>(8) == 0x00ff, "");
                 ^
   /Users/ripley/R/packages/tests-devel/arrow/libarrow/arrow-14.0.0/include/arrow/util/bit_util.h:361:64: warning: implicit conversion loses integer precision: 'uint32_t' (aka 'unsigned int') to 'uint8_t' (aka 'unsigned char') [-Wimplicit-int-conversion]
                 values[4] << 4 | values[5] << 5 | values[6] << 6 | values[7] << 7);
                 ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~^~~~~~~~~~~~~~~~
   3 warnings generated.
   
   In file included from io.cpp:23:
   In file included from /Users/ripley/R/packages/tests-devel/arrow/libarrow/arrow-14.0.0/include/arrow/buffer_builder.h:30:
   /Users/ripley/R/packages/tests-devel/arrow/libarrow/arrow-14.0.0/include/arrow/util/bitmap_generate.h:95:35: warning: implicit conversion loses integer precision: 'int' to 'uint8_t' (aka 'unsigned char') [-Wimplicit-int-conversion]
                 out_results[6] << 6 | out_results[7] << 7);
                 ~~~~~~~~~~~~~~~~~~~~^~~~~~~~~~~~~~~~~~~~~
   /Users/ripley/R/packages/tests-devel/arrow/libarrow/arrow-14.0.0/include/arrow/buffer_builder.h:369:15: note: in instantiation of function template specialization 'arrow::internal::GenerateBitsUnrolled<(lambda at /Users/ripley/R/packages/tests-devel/arrow/libarrow/arrow-14.0.0/include/arrow/buffer_builder.h:369:79)>' requested here
       internal::GenerateBitsUnrolled(mutable_data(), bit_length_, num_elements, [&] {
      
   ```
   
   ### Component(s)
   
   R


-- 
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] [R] Compile with `-Wconversion` on clang15 results in compiler warnings [arrow]

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

   That's not a vendored cpp11 header right? So nothing we can do about itf/


-- 
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


Re: [I] [R] Compile with `-Wconversion` on clang15 results in compiler warnings [arrow]

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

   It will be very difficult (i.e., be a lot of work for Jacob...basically inventing a way to patch Arrow C++'s headers in the R package) to fix the CRAN status without the Arrow C++ portion of this included in 14.0.2. It might be more appropriate to separate the Arrow C++ half of this, which is very small, and consider *that* a blocker.


-- 
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


Re: [I] [R] Compile with `-Wconversion` on clang15 results in compiler warnings [arrow]

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

   > So nothing we can do about it?
   
   I can PR a fix if nobody has gotten there in a few days...some of those may be us, too and we just instantiate templates that otherwise wouldn't have been touched.


-- 
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


Re: [I] [R] Compile with `-Wconversion` on clang15 results in compiler warnings [arrow]

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

   is this a blocker for 14.0.2?


-- 
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


Re: [I] [R] Compile with `-Wconversion` on clang15 results in compiler warnings [arrow]

Posted by "paleolimbot (via GitHub)" <gi...@apache.org>.
paleolimbot closed issue #39138: [R] Compile with `-Wconversion` on clang15 results in compiler warnings
URL: https://github.com/apache/arrow/issues/39138


-- 
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