Issue 138973
Summary clang unknown warning option '-Walloc-size'
Labels clang
Assignees
Reporter jstengleingithub
    Gcc support warning flag -Walloc-size: https://gcc.gnu.org/onlinedocs/gcc/Warning-Options.html
Warn about calls to allocation functions decorated with attribute alloc_size that specify insufficient size for the target type of the pointer the result is assigned to, including those to the built-in forms of the functions aligned_alloc, alloca, calloc, malloc, and realloc.

Clang doesn't support this flag or catch the same issues gcc can catch with the flag.  See: https://godbolt.org/z/roMdhxce4
_______________________________________________
llvm-bugs mailing list
llvm-bugs@lists.llvm.org
https://lists.llvm.org/cgi-bin/mailman/listinfo/llvm-bugs

Reply via email to