-
Notifications
You must be signed in to change notification settings - Fork 15.3k
Closed
Copy link
Labels
clang:diagnosticsNew/improved warning or error message in Clang, but not in clang-tidy or static analyzerNew/improved warning or error message in Clang, but not in clang-tidy or static analyzerenhancementImproving things as opposed to bug fixing, e.g. new or missing featureImproving things as opposed to bug fixing, e.g. new or missing feature
Description
GCC has -Wunterminated-string-initialization and __attribute__((nonstring)) to counteract it.
The warning is included in -Wextra.
It warns for e.g. char foo[3] = "foo"; because the string will not have a '\0' terminator.
It doesn't warn for __attribute__((nonstring)) char foo[3] = "foo";.
This would be a useful feature to add to Clang.
Metadata
Metadata
Assignees
Labels
clang:diagnosticsNew/improved warning or error message in Clang, but not in clang-tidy or static analyzerNew/improved warning or error message in Clang, but not in clang-tidy or static analyzerenhancementImproving things as opposed to bug fixing, e.g. new or missing featureImproving things as opposed to bug fixing, e.g. new or missing feature