Landing: 1a9d7ee08ed4

Project / Subsystem

gcc / testsuite

Date

2026-08-06

Author

Jakub Jelinek

Commit

1a9d7ee08ed49c637e94dad2695532d78909f24f

Source

github

Perf win

No

Breaking

No

All attributes

project
gcc
subsystem
testsuite
patch_id
—
commit_hash
1a9d7ee08ed49c637e94dad2695532d78909f24f
source_type
github
headline
New testcase for `[[clang::no_specializations]]` attribute.
tldr
Adds a test to verify GCC's handling of `[[clang::no_specializations]]` on template declarations, ensuring it correctly diagnoses specializations.
author
Jakub Jelinek
outcome
committed
performance_win
false
breaking_change
false
series_id
—
series_parts
[]
tags
  • • testsuite
  • • c++
  • • templates
  • • attributes
discussion_id_link
—
bugzilla_pr
—
date
2026-08-06T00:00:00.000Z

This commit introduces a new test case to the GCC test suite. The test verifies the compiler’s behavior with the [[clang::no_specializations]] attribute when applied to a template declaration followed by a primary template definition without the attribute. It ensures that GCC, like Clang (which is being fixed), correctly diagnoses any subsequent explicit or partial specializations, preventing regressions in this area.