Add new warning -Walloca for use of builtin alloca function.
Also warns the use of __builtin_alloca_with_align. GCC has this warning, and we'd like to have this for compatibility.
Differential D64883
Add new warning -Walloca for use of builtin alloca function ziyig on Jul 17 2019, 2:15 PM. Authored by
Details Add new warning -Walloca for use of builtin alloca function. Also warns the use of __builtin_alloca_with_align. GCC has this warning, and we'd like to have this for compatibility.
Diff Detail Event TimelineComment Actions Thanks for this! Mostly just nitpicking the warning's wording. :)
|
nit: I'd just say "use of function '%0'" here; "builtin" doesn't really add much.
I also wonder if we should be saying anything more than "we found a use of this function." Looks like GCC doesn't (https://godbolt.org/z/sYs_8G), but since this warning is sort of opinionated in itself, might it be better to expand this to "use of '%0' is discouraged"?
WDYT, Aaron?