Skip to content

GH-50487: [C++] Extra semicolon warning from ARROW_SUPPRESS_DEPRECATION_WARNING macro with -Wpedantic#50489

Open
thisisnic wants to merge 1 commit into
apache:mainfrom
thisisnic:GH-50487-semicolon
Open

GH-50487: [C++] Extra semicolon warning from ARROW_SUPPRESS_DEPRECATION_WARNING macro with -Wpedantic#50489
thisisnic wants to merge 1 commit into
apache:mainfrom
thisisnic:GH-50487-semicolon

Conversation

@thisisnic

@thisisnic thisisnic commented Jul 13, 2026

Copy link
Copy Markdown
Member

Rationale for this change

The ARROW_SUPPRESS_DEPRECATION_WARNING and ARROW_SUPPRESS_MISSING_DECLARATIONS_WARNING macros have trailing semicolons after _Pragma directives, which produce empty statements and trigger -Wpedantic warnings wherever the macros are used.

What changes are included in this PR?

Remove unnecessary semicolons after _Pragma calls in the clang, GCC, and missing-declarations macro variants in macros.h.

Are these changes tested?

Existing tests cover these macros. The change only removes empty statements.

Are there any user-facing changes?

No.

@thisisnic thisisnic marked this pull request as ready for review July 13, 2026 08:53
@thisisnic thisisnic requested a review from pitrou as a code owner July 13, 2026 08:53
Copilot AI review requested due to automatic review settings July 13, 2026 08:53
@github-actions

Copy link
Copy Markdown

⚠️ GitHub issue #50487 has been automatically assigned in GitHub to PR creator.

Copilot AI left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Pull request overview

This PR fixes -Wpedantic warnings caused by empty statements emitted from warning-suppression macros in Arrow C++ headers. It updates cpp/src/arrow/util/macros.h so _Pragma(...) uses no trailing semicolons, preventing “extra ‘;’” warnings at macro expansion sites.

Changes:

  • Remove trailing semicolons after _Pragma(...) in the Clang and GCC ARROW_SUPPRESS_DEPRECATION_WARNING macro variants.
  • Remove trailing semicolons after _Pragma(...) in ARROW_SUPPRESS_MISSING_DECLARATIONS_WARNING for GCC.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

awaiting committer review Awaiting committer review

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants