-
Notifications
You must be signed in to change notification settings - Fork 13.5k
[[deprecated]] applied to local variables #90073
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Comments
@llvm/issue-subscribers-clang-frontend Author: cor3ntin (cor3ntin)
GCC warns on local variables marked `[[deprecated]]`
https://compiler-explorer.com/z/nvfdTeveP
This behavior seems to be backed by the standard https://eel.is/c++draft/dcl.attr#deprecated-2.sentence-1 Should we follow suite? Arguably, it would be of limited usefulness. |
Confirmed, seems like it has limited use but this at least documents we are aware of it. |
I don't really see the usefulness, but I DEFINITELY think we should enforce it if we are going to permit it on local variable decls. At the moment, the the standard permits them on local variable decls, AND encourages enforcement, so we should. However, if the response to cplusplus/CWG#530 results in disallowing 'local variables', that would be a valid solution ot this as well. |
Note, if we remove the |
…local variables (llvm#113575) Fixes llvm#90073
GCC warns on local variables marked
[[deprecated]]
https://compiler-explorer.com/z/nvfdTeveP
This behavior seems to be backed by the standard https://eel.is/c++draft/dcl.attr#deprecated-2.sentence-1
Should we follow suite? Arguably, it would be of limited usefulness.
The text was updated successfully, but these errors were encountered: