Skip to content

Conversation

@thomasnyman
Copy link
Contributor

@thomasnyman thomasnyman commented Oct 30, 2025

This PR adds the counted_by and sized_by attributes to the Compiler Annotations Guide.

Fixes #551.

Unlike other annotations covered by the guider, counted_by and sized_by improve run-time bounds-checking, hence an extended example in Compiler Explorer showcasing its function is not really feasible.

@thomasnyman thomasnyman merged commit 4d3b0d1 into main Nov 11, 2025
6 checks passed
@thomasnyman thomasnyman deleted the annotations-guide-counted-by branch November 11, 2025 14:27
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Projects

None yet

Development

Successfully merging this pull request may close these issues.

Create guidance on using buffer overflow attributes in C

2 participants