Uploaded image for project: 'Apache Arrow'
  1. Apache Arrow
  2. ARROW-12240

[Python] invalid-offsetof warning from apple clang-12

    XMLWordPrintableJSON

Details

    Description

      Similar issue as https://issues.apache.org/jira/browse/ARROW-11299.

      Found when building pyarrow on Macos M1. I don't think it's platform related.
      No warning for clang-9, but apple clang-12 complains about it.

      Error log:

      [ 13%] Building CXX object CMakeFiles/_csv.dir/_csv.cpp.o
      /Users/cyb/work/arrow/python/build/temp.macosx-11.0-arm64-3.9/_csv.cpp:19051:133: warning: offset of on non-standard-layout type 'struct __pyx_obj_7pyarrow_4_csv_ConvertOptions' [-Winvalid-offsetof]
        if (__pyx_type_7pyarrow_4_csv_ConvertOptions.tp_weaklistoffset == 0) __pyx_type_7pyarrow_4_csv_ConvertOptions.tp_weaklistoffset = offsetof(struct __pyx_obj_7pyarrow_4_csv_ConvertOptions, __pyx_base.__weakref__);
      ^                                                        ~~~~~~~~~~
      /Library/Developer/CommandLineTools/usr/lib/clang/12.0.0/include/stddef.h:104:24: note: expanded from macro 'offsetof'
      #define offsetof(t, d) __builtin_offsetof(t, d)
      

      Attachments

        Issue Links

          Activity

            People

              yibocai#1 yibocai#1
              yibocai#1 yibocai#1
              Votes:
              0 Vote for this issue
              Watchers:
              4 Start watching this issue

              Dates

                Created:
                Updated:
                Resolved:

                Time Tracking

                  Estimated:
                  Original Estimate - Not Specified
                  Not Specified
                  Remaining:
                  Remaining Estimate - 0h
                  0h
                  Logged:
                  Time Spent - 1h 20m
                  1h 20m