[clang] [clang] Fix `gnu::init_priority` attribute handling for reserved values (PR #121577)

via cfe-commits cfe-commits at lists.llvm.org
Fri Jan 3 07:44:28 PST 2025


================
@@ -33,23 +33,22 @@ Two goo __attribute__((init_priority(2,3))) ( 5, 6 ); // expected-error {{'init_
 
 Two coo[2]  __attribute__((init_priority(100)));
 #if !defined(SYSTEM)
-  // expected-error at -2 {{'init_priority' attribute requires integer constant between 101 and 65535 inclusive}}
+  // expected-warning at -2 {{requested 'init_priority' 100 is reserved for internal use}}
----------------
el-ev wrote:

```suggestion
  // expected-error at -2 {{requested 'init_priority' 100 is reserved for internal use}}
```

https://github.com/llvm/llvm-project/pull/121577


More information about the cfe-commits mailing list