This is the mail archive of the
gcc-patches@gcc.gnu.org
mailing list for the GCC project.
Re: [wwwdocs] changes.html - document new warning options
- From: Aldy Hernandez <aldyh at redhat dot com>
- To: Martin Sebor <msebor at gmail dot com>, Gcc Patch List <gcc-patches at gcc dot gnu dot org>
- Cc: Gerald Pfeifer <gerald at pfeifer dot com>
- Date: Tue, 31 Jan 2017 05:50:02 -0500
- Subject: Re: [wwwdocs] changes.html - document new warning options
- Authentication-results: sourceware.org; auth=none
- References: <737b809f-d95a-8e68-4ac2-74600359afae@gmail.com>
On 01/24/2017 03:07 PM, Martin Sebor wrote:
Hi Martin.
Thank you for taking care of this.
+ <li><p>The <code>-Walloca-larger-than=<i>size</i></code> option detects
+ calls to the <code>alloca</code> function whose argument may exceed
+ the specified <code><i>size</i></code>.
+ <code>-Walloca-larger-than</code> is not included in either
+ <code>-Wall</code> or <code>-Wextra</code> and must be explicitly
+ enabled.</p>
You should probably document that we warn, not just on arguments that
exceed a specific threshold, but arguments that are unbounded or unknown
at compile time:
foo (size_t n)
{
...
p = alloca(n);
...
}
Thanks.
Aldy