This shows up when building the R package:
/home/nic/arrow-dist/include/arrow/util/macros.h:160:35: warning: extra ‘;’ [-Wpedantic]
160 | _Pragma("GCC diagnostic push"); \
| ^
/home/nic/arrow-dist/include/arrow/compute/api_vector.h:277:3: note: in expansion of macro ‘ARROW_SUPPRESS_DEPRECATION_WARNING’
277 | ARROW_SUPPRESS_DEPRECATION_WARNING
| ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
The ARROW_SUPPRESS_DEPRECATION_WARNING macro for GCC has a trailing semicolon after the first _Pragma directive:
|
# define ARROW_SUPPRESS_DEPRECATION_WARNING \ |
|
_Pragma("GCC diagnostic push"); \ |
|
_Pragma("GCC diagnostic ignored \"-Wdeprecated-declarations\"") |
Since _Pragma is a complete directive, the semicolon becomes an empty statement, triggering -Wpedantic warnings wherever the macro is used (e.g. api_vector.h:134):
/arrow/util/macros.h:160:35: warning: extra ';' [-Wpedantic]
The same issue exists on the clang branch (line 155).
Removing the trailing semicolons from the _Pragma lines in the macro definition would fix it.
Authored by Claude, reviewed by thisisnic
This shows up when building the R package:
The ARROW_SUPPRESS_DEPRECATION_WARNING macro for GCC has a trailing semicolon after the first _Pragma directive:
arrow/cpp/src/arrow/util/macros.h
Lines 159 to 161 in 83c185b
Since _Pragma is a complete directive, the semicolon becomes an empty statement, triggering -Wpedantic warnings wherever the macro is used (e.g. api_vector.h:134):
The same issue exists on the clang branch (line 155).
Removing the trailing semicolons from the _Pragma lines in the macro definition would fix it.
Authored by Claude, reviewed by thisisnic