Skip to content

feat(post): reflection can flag a dangling signature that GCC 16.2 does not warn about - #206

Merged
filipsajdak merged 3 commits into
mainfrom
feat/post-reflection-dangling-signature
Oct 18, 2026
Merged

filipsajdak merged 3 commits into
mainfrom
feat/post-reflection-dangling-signature

Conversation

@filipsajdak

Copy link
Copy Markdown
Contributor

Oct 29 short, written in response to Klaus Iglberger's safety article (modernescpp.com, 2026-10-18). A reflection lint of 58 lines flags 3 of 5 declarations on GCC 16.2 and trunk. For the view-of-a-by-value-owner bug, -Wall -Wextra (and -Wdangling-pointer=2) give no warning, a plain run shows a stale view, and ASan reports a heap use after free; the reference bug gets -Wdangling-reference. Four Compiler Explorer permalinks; the demos are deterministic (checked three times). Registers a 16:00Z double beside the API-contract post.

Visual: the post's two tables and the rendered card in the social commit.

Gates: prose-lint, check-pubdates, check-llms-sync, check-social-render, unit tests, production build, check:future. Examples: wrocpp/cpp26-reflection-examples#51 (merged).

🤖 Generated with Claude Code

https://claude.ai/code/session_01BTCmkp4nQKAhWT8TGXF9KX

filipsajdak and others added 3 commits October 19, 2026 01:49
…signature lint

The API contract post holds the 08:00Z slot that day. The short written in
response to Klaus Iglberger's safety article goes out at 16:00Z beside it.

Co-Authored-By: Claude Sonnet 5.5 <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_01BTCmkp4nQKAhWT8TGXF9KX
…es not warn about

A consteval walk over a namespace flags a view returned from a by-value
owner and a const reference returned from const references of one type.
On GCC 16.2 the view bug gets no -Wall -Wextra warning (also none with
-Wdangling-pointer=2), prints a stale view in a plain run, and fails
AddressSanitizer with a heap use after free. The reference bug gets a
-Wdangling-reference warning. Written in response to Klaus Iglberger's
safety article of 18 October.

Co-Authored-By: Claude Sonnet 5.5 <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_01BTCmkp4nQKAhWT8TGXF9KX
@filipsajdak
filipsajdak merged commit d509f93 into main Oct 18, 2026
2 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant