Re: [patch] Enhance support for -Wstack-usage/-Wvla-larger-than/-Walloca-larger-than

2017-10-19 Thread Richard Biener
On Thu, Oct 19, 2017 at 12:28 PM, Eric Botcazou wrote: >> Looks ok. I wonder if you want to explicitely document that max_size < size >> doesn't have any effect on actual code generation and is not checked for. > > Documentation amended to that effect: > > -- Built-in

Re: [patch] Enhance support for -Wstack-usage/-Wvla-larger-than/-Walloca-larger-than

2017-10-19 Thread Eric Botcazou
> Looks ok. I wonder if you want to explicitely document that max_size < size > doesn't have any effect on actual code generation and is not checked for. Documentation amended to that effect: -- Built-in Function: void *__builtin_alloca_with_align_and_max (size_t size, size_t

Re: [patch] Enhance support for -Wstack-usage/-Wvla-larger-than/-Walloca-larger-than

2017-10-17 Thread Richard Biener
On Mon, Oct 16, 2017 at 10:35 AM, Eric Botcazou wrote: > Hi, > > a big limitation of -Wstack-usage/-Wvla-larger-than/-Walloca-larger-than is > that you need -O2 (or more precisely -ftree-vrp) in order to be able to say > something sensible for dynamically-sized

[patch] Enhance support for -Wstack-usage/-Wvla-larger-than/-Walloca-larger-than

2017-10-16 Thread Eric Botcazou
Hi, a big limitation of -Wstack-usage/-Wvla-larger-than/-Walloca-larger-than is that you need -O2 (or more precisely -ftree-vrp) in order to be able to say something sensible for dynamically-sized objects/VLAs/calls to alloca. That can be problematic, for example if the coding guidelines