RFA: new pass to warn on questionable uses of alloca() and VLAs
Aldy Hernandez
aldyh@redhat.com
Mon Jul 18 10:10:00 GMT 2016
On 07/17/2016 11:52 AM, Manuel López-Ibáñez wrote:
> On 15/07/16 18:05, Aldy Hernandez wrote:
>
> + case OPT_Walloca_larger_than_:
> + if (!value)
> + inform (loc, "-Walloca-larger-than=0 is meaningless");
> + break;
> +
> + case OPT_Wvla_larger_than_:
> + if (!value)
> + inform (loc, "-Wvla-larger-than=0 is meaningless");
> + break;
> +
>
> We don't give similar notes for any of the other Wx-larger-than=
> options. If -Wvla-larger-than=0 suppresses a previous
> -Wvla-larger-than=, then it doesn't seem meaningless, but a useful thing
> to have.
I'm trying to avoid confusing users that may think that
-Walloca-larger-than=0 means warn on any use of alloca. That is what
-Walloca is for. But really, I don't care. If you feel strongly about
it, I can just remove the block of code.
Aldy
More information about the Gcc-patches
mailing list