Skip to content

[C++] ARROW_DEPRECATED warning when including io/interfaces.h from CUDA (.cu) source #22594

@asfimport

Description

@asfimport

When including arrow/io/interfaces.h from a .cu source file (compiled with nvcc, the CUDA compiler), we get warnings like the following:

[6/58] Building CUDA obje.../csv/csv_reader_impl.cu.
arrow/install/include/arrow/io/interfaces.h(195): warning: attribute does not apply to any entity

This example is from compiling [libcudf|[https://github.com/rapidsai/cudf].] libcudf installs these headers and includes them. This is a problem for libraries like libcudf which treat warnings as errors.

There is a simple fix (I will submit a PR): change this code in interfaces.h:

// TODO(kszucs): remove this after 0.13
#ifndef _MSC_VER
using WriteableFile ARROW_DEPRECATED("Use WritableFile") = WritableFile;
using ReadableFileInterface ARROW_DEPRECATED("Use RandomAccessFile") = RandomAccessFile;
#else``// MSVC does not like using ARROW_DEPRECATED with using declarations``using WriteableFile = WritableFile;
using ReadableFileInterface = RandomAccessFile;
#endif
 
Just change the ifndef to:
#if not defined(_MSC_VER) && not defined(__CUDACC__)
This fix should have no impact on other compilers.

Reporter: Mark Harris / @harrism
Assignee: Mark Harris / @harrism

PRs and other links:

Note: This issue was originally created as ARROW-6205. Please see the migration documentation for further details.

Metadata

Metadata

Assignees

No one assigned

    Type

    No type
    No fields configured for issues without a type.

    Projects

    No projects

    Milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions