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


>>>>> "Raksit" == Raksit Ashok <raksit.ashok@gmail.com> writes:

Raksit> This patch adds a "-Walloca" option to gcc. If this warning is
Raksit> enabled, gcc will emit a warning on encountering "alloca"
Raksit> calls. This option could be used to enforce coding conventions
Raksit> that forbid use of alloca. For example:
Raksit> http://www.dc.turkuamk.fi/docs/gnu/awk/gawk_21.html
Raksit> http://www-unix.mcs.anl.gov/mpi/mpich/adi3/mpich2/node316.htm

If alloca is forbidden, couldn't you simply poison the identifier?
I suppose that won't work if you have a system header that defines a
macro which expands to use alloca.  But does that happen?

Tom


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