aboutsummaryrefslogtreecommitdiff
path: root/gcc/genmatch.c
diff options
context:
space:
mode:
authorMartin Sebor <msebor@redhat.com>2016-09-01 22:47:49 +0000
committerMartin Sebor <msebor@gcc.gnu.org>2016-09-01 16:47:49 -0600
commit3d7b83b6718e54c7305b24dd73b44af1c11fc721 (patch)
treecf5a770b54a1fa30fb7b5d7835bb4cf4f1dc71cf /gcc/genmatch.c
parent3b2475ab3178e98c61314b069cd64fe5ffa8bf45 (diff)
downloadgcc-3d7b83b6718e54c7305b24dd73b44af1c11fc721.zip
gcc-3d7b83b6718e54c7305b24dd73b44af1c11fc721.tar.gz
gcc-3d7b83b6718e54c7305b24dd73b44af1c11fc721.tar.bz2
c-ada-spec.c (dump_ada_function_declaration): Increase buffer size to guarantee it fits the output of the formatted function...
gcc/c-family/ChangeLog: * c-ada-spec.c (dump_ada_function_declaration): Increase buffer size to guarantee it fits the output of the formatted function regardless of its arguments. gcc/cp/ChangeLog: * mangle.c: Increase buffer size to guarantee it fits the output of the formatted function regardless of its arguments. gcc/go/ChangeLog: * gofrontend/expressions.cc: Increase buffer size to guarantee it fits the output of the formatted function regardless of its arguments. gcc/java/ChangeLog: * decl.c (give_name_to_locals): Increase buffer size to guarantee it fits the output of the formatted function regardless of its arguments. * mangle_name.c (append_unicode_mangled_name): Same. gcc/ChangeLog: * genmatch.c (parser::parse_expr): Increase buffer size to guarantee it fits the output of the formatted function regardless of its arguments. * gcc/genmodes.c (parser::parse_expr): Same. * gimplify.c (gimplify_asm_expr): Same. * passes.c (pass_manager::register_one_dump_file): Same. * print-tree.c (print_node): Same. From-SVN: r239949
Diffstat (limited to 'gcc/genmatch.c')
-rw-r--r--gcc/genmatch.c3
1 files changed, 2 insertions, 1 deletions
diff --git a/gcc/genmatch.c b/gcc/genmatch.c
index 02e945a..6195a3b 100644
--- a/gcc/genmatch.c
+++ b/gcc/genmatch.c
@@ -4051,7 +4051,8 @@ parser::parse_expr ()
else if (force_capture)
{
unsigned num = capture_ids->elements ();
- char id[8];
+ /* Big enough for a 32-bit UINT_MAX plus prefix. */
+ char id[13];
bool existed;
sprintf (id, "__%u", num);
capture_ids->get_or_insert (xstrdup (id), &existed);