+2016-09-01 Martin Sebor <msebor@redhat.com>
+
+ * 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.
+
2016-09-01 Segher Boessenkool <segher@kernel.crashing.org>
* config/rs6000/altivec.md: Use VSCR_REGNO instead of 110 throughout.
+2016-09-01 Martin Sebor <msebor@redhat.com>
+
+ * 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.
+
2016-09-01 Marek Polacek <polacek@redhat.com>
PR c/7652
{
tree arg;
const tree node = TREE_TYPE (func);
- char buf[16];
+ char buf[17];
int num = 0, num_args = 0, have_args = true, have_ellipsis = false;
/* Compute number of arguments. */
+2016-09-01 Martin Sebor <msebor@redhat.com>
+
+ * mangle.c: Increase buffer size to guarantee it fits the output
+ of the formatted function regardless of its arguments.
+
2016-09-01 Marek Polacek <polacek@redhat.com>
PR c/7652
write_real_cst (const tree value)
{
long target_real[4]; /* largest supported float */
- char buffer[9]; /* eight hex digits in a 32-bit number */
+ /* Buffer for eight hex digits in a 32-bit number but big enough
+ even for 64-bit long to avoid warnings. */
+ char buffer[17];
int i, limit, dir;
tree type = TREE_TYPE (value);
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);
{
struct mode_data *m;
struct mode_data *v;
- char buf[8];
+ /* Big enough for a 32-bit UINT_MAX plus the text. */
+ char buf[12];
unsigned int ncomponents;
enum mode_class vclass = vector_class (cl);
flexibility, split it into separate input and output
operands. */
tree input;
- char buf[10];
+ /* Buffer big enough to format a 32-bit UINT_MAX into. */
+ char buf[11];
/* Turn the in/out constraint into an output constraint. */
char *p = xstrdup (constraint);
/* And add a matching input constraint. */
if (allows_reg)
{
- sprintf (buf, "%d", i);
+ sprintf (buf, "%u", i);
/* If there are multiple alternatives in the constraint,
handle each of them individually. Those that allow register
+2016-09-01 Martin Sebor <msebor@redhat.com>
+
+ * gofrontend/expressions.cc: Increase buffer size to guarantee
+ it fits the output of the formatted function regardless of its
+ arguments.
+
2016-08-29 Ian Lance Taylor <iant@google.com>
* lang.opt (fgo-c-header, fgo-compiling-runtime): New options.
Location loc = this->location();
int i = 0;
- char buf[10];
+ /* Buffer large enough for INT_MAX plus the prefix. */
+ char buf[14];
for (Typed_identifier_list::const_iterator p = results->begin();
p != results->end();
++p, ++i)
+2016-09-01 Martin Sebor <msebor@redhat.com>
+
+ * 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.
+
2016-08-26 Richard Biener <rguenther@suse.de>
java/
DECL_NAME (parm) = get_identifier ("this");
else
{
- char buffer[12];
+ /* Buffer large enough for INT_MAX plus prefix. */
+ char buffer[15];
sprintf (buffer, "ARG_%d", arg_i);
DECL_NAME (parm) = get_identifier (buffer);
}
append_gpp_mangled_name (const char *name, int len)
{
int encoded_len, needs_escapes;
- char buf[6];
+ /* Buffer large enough for INT_MIN. */
+ char buf[9];
MANGLE_CXX_KEYWORDS (name, len);
/* Everything else needs encoding */
else
{
- char buf [9];
+ /* Buffer large enough for UINT_MAX plus the prefix. */
+ char buf [13];
if (ch == '_' || ch == 'U')
{
/* Prepare to recognize __U */
{
char *dot_name, *flag_name, *glob_name;
const char *name, *full_name, *prefix;
- char num[10];
+
+ /* Buffer big enough to format a 32-bit UINT_MAX into. */
+ char num[11];
int flags, id;
int optgroup_flags = OPTGROUP_NONE;
gcc::dump_manager *dumps = m_ctxt->get_dumps ();
/* See below in next_pass_1. */
num[0] = '\0';
if (pass->static_pass_number != -1)
- sprintf (num, "%d", ((int) pass->static_pass_number < 0
+ sprintf (num, "%u", ((int) pass->static_pass_number < 0
? 1 : pass->static_pass_number));
/* The name is both used to identify the pass for the purposes of plugins,
i = 0;
FOR_EACH_CALL_EXPR_ARG (arg, iter, node)
{
- char temp[10];
- sprintf (temp, "arg %d", i);
+ /* Buffer big enough to format a 32-bit UINT_MAX into, plus
+ the text. */
+ char temp[15];
+ sprintf (temp, "arg %u", i);
print_node (file, temp, arg, indent + 4);
i++;
}
for (i = 0; i < len; i++)
{
- char temp[10];
+ /* Buffer big enough to format a 32-bit UINT_MAX into, plus
+ the text. */
+ char temp[15];
sprintf (temp, "arg %d", i);
print_node (file, temp, TREE_OPERAND (node, i), indent + 4);
for (i = 0; i < len; i++)
if (TREE_VEC_ELT (node, i))
{
- char temp[10];
+ /* Buffer big enough to format a 32-bit UINT_MAX into, plus
+ the text. */
+ char temp[15];
sprintf (temp, "elt %d", i);
print_node (file, temp, TREE_VEC_ELT (node, i), indent + 4);
}