[clang] [clang] Fix `gnu::init_priority` attribute handling for reserved values (PR #121577)
Aaron Ballman via cfe-commits
cfe-commits at lists.llvm.org
Fri Jan 17 05:03:18 PST 2025
https://github.com/AaronBallman requested changes to this pull request.
> Allow values within the range 0-100 of init_priority to be used outside system library, but with a warning
This was an intentional decision, not a bug or an oversight (I'm sorry, I didn't see that @philnik777 had marked this a good first issue!). See https://github.com/llvm/llvm-project/pull/67673 for details. Basically: a warning is insufficient because it provides zero protection for the real world uses of the attribute. Reserved in this case really does mean "you only get to use those values if you're a system header" and we live with the "hole" that GNU line markers provide.
I don't think we should move forward with this change unless there's a strong need to do so.
https://github.com/llvm/llvm-project/pull/121577
More information about the cfe-commits
mailing list