This is the mail archive of the
gcc-patches@gcc.gnu.org
mailing list for the GCC project.
Re: [PATCH]: New warning option -Walloca
- From: "Raksit Ashok" <raksit dot ashok at gmail dot com>
- To: tromey at redhat dot com
- Cc: "Kaveh R. GHAZI" <ghazi at caip dot rutgers dot edu>, "Seongbae Park (박성배, 朴成培)" <spark at google dot com>, "Manuel López-Ibáñez" <lopezibanez at gmail dot com>, gcc-patches at gcc dot gnu dot org, briangrant at google dot com, cgd at google dot com, dave dot korn at artimi dot com
- Date: Thu, 13 Sep 2007 12:05:19 -0700
- Subject: Re: [PATCH]: New warning option -Walloca
- References: <49886b970708301427r645c9dr58443fc40385cd6e@mail.gmail.com> <6c33472e0708310428l293796a7q3e4819fc161d4f71@mail.gmail.com> <m3r6ljn7ga.fsf@fleche.redhat.com> <49886b970708311039l44973190oab6be6ae5b2fd42b@mail.gmail.com> <6c33472e0708311135p42866befoed79df78f17575ff@mail.gmail.com> <49886b970708311332ha7aa4bet3d2bbf38650c4563@mail.gmail.com> <Pine.GSO.4.58.0708311644520.15983@caipclassic.rutgers.edu> <84c2458f0708311355l6027dd56u15f56ac4cb53fdfd@mail.gmail.com> <Pine.GSO.4.58.0708311711590.16096@caipclassic.rutgers.edu> <m3wsvbl1pn.fsf@fleche.redhat.com>
On 8/31/07, Tom Tromey <tromey@redhat.com> wrote:
> >>>>> "Kaveh" == Kaveh R GHAZI <ghazi@caip.rutgers.edu> writes:
>
> Kaveh> Note I'm not really against the new warning, I'm just pointing
> Kaveh> out that a mechanism already exists.
>
> FWIW I don't really like the new warning. It is not general enough.
The "poison alloca" approach is difficult since it requires: (1)
including a header file which contains a poison pragma in all the
source files; and (2) doing so AFTER all the system headers have been
included. The command-line option based "-Walloca" approach works
really nicely for us.
However, since that patch was deemed too specific, I am wondering if
something like "-Wdisallowed-functions=alloca,__builtin_alloca,foo,bar..."
(like Dave suggested earlier) would be acceptable.. ? I will gladly
work on that then..
Thanks,
Raksit