Suppress AppleClang 21 reserved-identifier errors for internal __wt_* tags

XMLWordPrintableJSON

    • Type: Bug
    • Resolution: Won't Fix
    • Priority: Major - P3
    • None
    • Affects Version/s: None
    • Component/s: Build
    • Storage Engines
    • 210.094
    • None
    • None

      Issue Summary

      WiredTiger fails to compile with AppleClang 21 when strict Clang warnings are enabled because generated/public headers declare internal struct tags beginning with double underscores, such as struct __wt_connection. AppleClang 21 diagnoses these names under -Wreserved-identifier, and WiredTiger promotes the warning to an error.

      error: identifier '__wt_connection' is reserved because it starts with '__' [-Werror,-Wreserved-identifier]
      

      Context

      • The failure occurs in the generated include/wiredtiger.h while compiling normal WiredTiger C sources, including src/block/block_addr.c.
      • The strict Clang configuration enables -Weverything and -Werror.
      • The existing -Wno-reserved-id-macro suppression only covers reserved macro names; it does not suppress -Wreserved-identifier.
      • The failure reproduces independently with Python/SWIG disabled, so it is not a SWIG-specific failure.

      Proposed Solution

      • Add an intentional -Wno-reserved-identifier suppression for the affected Clang builds, or otherwise scope the suppression to the generated/public WiredTiger header.
      • Evaluate whether the suppression should apply globally to WiredTiger C targets or only to code that includes the generated API header.
      • Avoid renaming all existing _wt* tags unless the ABI and generated-header impact has been evaluated.

      Acceptance Criteria

      • WiredTiger builds successfully with AppleClang 21 using the strict warning configuration.
      • The intentional suppression does not hide unrelated diagnostics.
      • Existing Clang and non-Clang warning policies remain unchanged.
      • A macOS/AppleClang build check covers the affected configuration.

            Assignee:
            [DO NOT USE] Backlog - Storage Engines Team
            Reporter:
            Haribabu Kommi
            Votes:
            0 Vote for this issue
            Watchers:
            1 Start watching this issue

              Created:
              Updated:
              Resolved: