#pragma clang diagnostic push ignores garbage at end of line without warning #13920
Labels
bugzilla
Issues migrated from bugzilla
clang:diagnostics
New/improved warning or error message in Clang, but not in clang-tidy or static analyzer
confirmed
Verified by a second party
Extended Description
I blithely wrote the following code:
#pragma clang diagnostic push ignored "-Wdeprecated-declarations"
Which should not be expected to work, nor is it documented to. Owing to a mental scotoma I could not comprehend why deprecated-declaration warning continued to be issued.
As it happens you can put nigh anything at the end of the line and the compiler will silently ignore it.
If the compiler had warned about the garbage, it would have saved me some mental anguish. Perhaps we need to add -Wextra-stuff-at-end-of-pragma. Or perhaps we don't need to make that one optional.
The text was updated successfully, but these errors were encountered: