This is the mail archive of the gcc-patches@gcc.gnu.org mailing list for the GCC project.


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]
Other format: [Raw text]

Re: [PATCH]: New warning option -Walloca


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


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]