Issue |
137705
|
Summary |
__attribute__((nonstring)) and -Wunterminated-string-initialization
|
Labels |
clang
|
Assignees |
|
Reporter |
frobtech
|
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.
_______________________________________________
llvm-bugs mailing list
llvm-bugs@lists.llvm.org
https://lists.llvm.org/cgi-bin/mailman/listinfo/llvm-bugs