Landing: f6a1e69999d7

Project / Subsystem

gcc / gcc

Date

2025-09-30

Author

Jørgen Kvalsvik

Commit

f6a1e69999d7b614cbcedff6ecaa01b713f31266

Source

github

Perf win

No

Breaking

No

All attributes

project
gcc
subsystem
gcc
patch_id
—
commit_hash
f6a1e69999d7b614cbcedff6ecaa01b713f31266
source_type
github
headline
Add attribute and pragma for source code coverage suppression.
tldr
New attribute and pragma allow developers to exclude specific code sections from coverage reports.
author
Jørgen Kvalsvik
outcome
committed
performance_win
false
breaking_change
false
series_id
—
series_parts
[]
tags
  • • coverage
  • • debugging
  • • gcov
  • • testing
discussion_id_link
—
bugzilla_pr
—
date
2025-09-30T00:00:00.000Z

GCC now supports [[gnu::suppress_coverage]] attribute and #pragma GCC suppress_coverage to exclude functions or code blocks from coverage reports. This is useful for code like unreachable asserts or library code that shouldn’t impact user-facing coverage metrics. It provides finer-grained control than existing file-level filtering.