← Back to Pull requests

Only use the bundled stdatomic.h on Clang without c_atomic #613

Open
unknown opened this pull request with 195 lines diff across 2 files
View on GitHub
unknown unknown commented on Nov 16, 2026 08:46 UTC
Author

Description

<!--
Please include a summary of the changes and the related issue.
Highlight any key points or areas of concern.
-->
Fixes a build regression in lyrical on newlib-based toolchains (GCC < 14), introduced by #590:

src/testing/fault_injection.c:26:63: error: invalid initializer
static atomic_int_least64_t g_rcutils_fault_injection_count = -1;

newlib's sys/cdefs.h defines a __has_feature(x) stub that always returns 0. When it's included before stdatomic_helper.h, the Clang check selects the struct-based stdatomic_helper/gcc/stdatomic.h on GCC. This change checks for __clang__ directly, which is the intention of the check.

The header stays in place, so there's no API change. Other platforms are unaffected. rolling doesn't need this because #589 removed the header. Reproduced and verified with ESP32 GCC 8.2 (micro-ROS FreeRTOS/Zephyr targets).

<!--
Automatically closes linked issue when PR is merged.
Usage: Fixes #<issue number>, or Fixes (paste link of issue).

-->

Is this user-facing behavior change?

<!--
If no, just leave this section empty.
If yes, please explain how user-experience changes with this pull request.
-->

Did you use Generative AI?

<!--
If this pull request was generated using Generative AI, please specify the tool and model used (e.g., GitHub Copilot, GPT-4.1).
If only specific parts were generated by Generative AI, please list those parts (e.g., function A, class B, etc.).
-->
Yes, Claude Opus 5.5 was used to find the solution.

Diff: 195 lines (+146 / -49) across 2 files Reviewer: fujitatomoya Review duration: 9330m
All Vouch review confidence checks passed
Residual risk 0.19 = Change Risk (0.36) × (1 − Review Confidence (0.47)). Review depth and reviewer attention state are adequate.
Model 1 · Change Risk (XGBoost)
Score: 0.36 · 195 lines diff across 2 files
0.36
Model 2 · Review Depth (DistilBERT)
Depth Score: 0.02 · 1 substantive comment(s)
0.02
Model 3 · Review Timing & Attention
Session adequacy: 100% · Reviewer familiarity: 35%
46%
Bedrock Claude 3 · Risk Narration
(disconnected)
Groq
Groq Risk Narration
AWS Bedrock is currently disconnected. Generate high-confidence PR triage narration on-demand using Groq.
Model 1 · Change Risk Attribution
SHAP Weights
Shallow Review Depth shallow_review_depth
0.344
Diff Size diff_size
0.316
Real PR Conversation Timeline
1 comments
"Review active on #613"
general weight: 0.35
Reviewers
Assignees
Unassigned
Labels
risk: low confidence: 46.7% reviewed
Vouch Risk Breakdown
AI-powered review risk analysis
Change Risk
Change Risk · Model 1 (XGBoost)
Predicted defect probability (0.00–1.00) based on diff churn, modified sensitive files, and author risk history.
Score: 36% (MEDIUM) · Higher = larger blast radius
36%
Review Confidence
Review Confidence · Models 2 & 3
Scrutiny score (0.00–1.00) combining DistilBERT semantic review depth with reviewer familiarity and session dwell time.
Score: 46.7% · Lower = rushed or shallow review
46.7%
Residual Risk
Residual Risk · Core Equation
Residual = Change × (1 − Confidence)
Unmitigated risk surviving review. ≥ 0.65 triggers an automated re-queue to protect production.
Score: 19.2% · Safe to merge
19.2%
Repository