Place pg_noreturn before extern so C23 compilers accept it - #65
Conversation
Up to standards ✅🟢 Issues
|
| Metric | Results |
|---|---|
| Complexity | 0 |
| Duplication | 0 |
NEW Get contextual insights on your PRs based on Codacy's metrics, along with PR and Jira context, without leaving GitHub. Enable AI reviewer
TIP This summary will be updated as you push new changes.
|
No actionable comments were generated in the recent review. 🎉 ℹ️ Recent review info⚙️ Run configurationConfiguration used: Path: .coderabbit.yaml Review profile: CHILL Plan: Pro Run ID: 📒 Files selected for processing (1)
Included review availability: 4 reviews are currently available. Based on recent review activity, included reviews refill at 5 per hour. 📝 WalkthroughWalkthroughThe header now documents PostgreSQL 18+ Merge Risk: ⚪ Minimal · up to This localized header change fixes C23 compilation for the affected build while preserving behavior on other supported PostgreSQL versions; no actionable merge-blocking risk remains beyond normal checks and review. 🚥 Pre-merge checks | ✅ 5✅ Passed checks (5 passed)
✨ Finishing Touches📝 Generate docstrings
🧪 Generate unit tests (beta)
Comment |
dpage
left a comment
There was a problem hiding this comment.
Independently verified: I hit this exact failure packaging v1.1-beta1 (ubuntu:resolute/pg19), traced it to the same root cause, and reproduced both the break and this fix locally with gcc -std=c23. Diff is identical to the fix I'd drafted, plus a nice explanatory comment mine lacked.
v1.1-beta1's release pipeline failed to build the DEB package for ubuntu:resolute/pg19 (the only cell on gcc 15, which defaults to C23) and that failure blocked the entire batched APT publish step, so no Debian/Ubuntu packages went out for beta1 at all. #65 fixes the underlying pg_noreturn/C23 attribute-ordering bug; this commit adds the [1.1-beta2] changelog entry for it. Release-Date: 2026-08-18
Problem
The
v1.1-beta1release run failed on one cell —Package DEB (ubuntu:resolute amd64 pg19):src/pgedge_vectorizer.h:194:36: error: expected identifier or '(' before 'void'
194 | extern PGDLLEXPORT PGEDGE_NORETURN void pgedge_vectorizer_launcher_main(...)
PGEDGE_NORETURNexpands to PostgreSQL'spg_noreturn, which PG19 defines as the C23[[noreturn]]attribute when__STDC_VERSION__ >= 202311L. C23 only permits an attributelist at the start of a declaration, so placing it between the storage class and the return
type is a syntax error. Ubuntu resolute ships gcc 15, which defaults to
-std=gnu23— theonly image in the matrix that reaches that branch. PG19's own
c.hnotes the requirement:"C23 attributes must be placed at the start of a declaration."
Fix
Move
PGEDGE_NORETURNahead ofexternon the two worker entry-point declarations, matchinghow PostgreSQL's own headers spell it, and document why the order matters.
Compatibility
No behavior change on any other cell:
pg_noreturn;PGEDGE_NORETURNis empty and the suffixpg_attribute_noreturn()is unchanged._Noreturn, a C11 function specifier, valid anywhere in the declaration specifiers._Noreturn; only gcc 15's C23 default produces[[noreturn]].