This is the mail archive of the
mailing list for the GCC project.
Re: [PATCH] Move -Walloca and related warnings from c.opt to common.opt
On 30 July 2018 at 17:45, Martin Sebor <email@example.com> wrote:
> On 07/30/2018 09:28 AM, Jakub Jelinek wrote:
>> On Sun, Jul 29, 2018 at 08:35:39PM +0200, Iain Buclaw wrote:
>>> Since r262910, it was noticed that new -Walloca-larger-than= warnings
>>> started appearing when building the D frontend's standard library.
>>> These have been checked and verified as valid, and appropriate fixes
>>> will be sent on upstream.
>>> As for the warning itself, as it is now default on, it would be
>>> preferable to be able control it. Given the choice between adding
>>> these options to the D frontend or moving them to common, I'd rather
>>> move them to common.
>> It is strange to add a warning option for languages that don't even have
>> alloca. Instead, the warning shouldn't be enabled by default (but Martin
>> doesn't want to listen to that), or at least should be enabled only for
>> languages where it makes sense.
> I agree that the warning shouldn't be enabled for languages that
> don't have support for alloca.
Fair enough, I'll add them to D instead then.
I am curious though if its possible to trigger warnings from languages
that don't have direct support for alloca. However having a look, the
only places that generate a call to alloca deal with variable-sized