From 34ad94d88cc7646f1d1eceea20a4451100265fd5 Mon Sep 17 00:00:00 2001 From: Jason Merrill Date: Wed, 28 Oct 2009 14:39:25 -0400 Subject: [PATCH] * decl.c (cp_fname_init): Correct build_string argument. From-SVN: r153681 --- gcc/cp/ChangeLog | 4 ++++ gcc/cp/decl.c | 2 +- 2 files changed, 5 insertions(+), 1 deletion(-) diff --git a/gcc/cp/ChangeLog b/gcc/cp/ChangeLog index ba4caf84624..21eff5cb04c 100644 --- a/gcc/cp/ChangeLog +++ b/gcc/cp/ChangeLog @@ -1,3 +1,7 @@ +2009-10-28 Jason Merrill + + * decl.c (cp_fname_init): Correct build_string argument. + 2009-10-27 Jason Merrill Allow no-capture lambdas to convert to function pointer. diff --git a/gcc/cp/decl.c b/gcc/cp/decl.c index 33023a7649c..349d3b3d63e 100644 --- a/gcc/cp/decl.c +++ b/gcc/cp/decl.c @@ -3512,7 +3512,7 @@ cp_fname_init (const char* name, tree *type_p) { length = strlen (name); domain = build_index_type (size_int (length)); - init = build_string (length + 1, name); + init = build_string (length, name); } type = build_qualified_type (char_type_node, TYPE_QUAL_CONST);