+2015-11-08 Martin Sebor <msebor@redhat.com>
+
+ * c.opt (Wplacement-new): Add a period to the end of a sentence.
+
2015-11-07 Richard Sandiford <richard.sandiford@arm.com>
* c-common.c: Don't undef DEF_BUILTIN.
Wplacement-new
C++ Var(warn_placement_new) Init(1) Warning
-Warn for placement new expressions with undefined behavior
+Warn for placement new expressions with undefined behavior.
Wredundant-decls
C ObjC C++ ObjC++ Var(warn_redundant_decls) Warning
+2015-11-08 Martin Sebor <msebor@redhat.com>
+
+ PR c++/67942
+ * cp/init.c (warn_placement_new_too_small): Convert integer
+ operand of POINTER_PLUS_EXPR to ssize_t to determine its signed
+ value.
+
2015-11-06 David Malcolm <dmalcolm@redhat.com>
* error.c (cp_printer): Update for new "caret_p" param for
if (TREE_CODE (oper) == POINTER_PLUS_EXPR)
{
/* If the offset is comple-time constant, use it to compute a more
- accurate estimate of the size of the buffer. Otherwise, use
- the size of the entire array as an optimistic estimate (this
- may lead to false negatives). */
- const_tree adj = TREE_OPERAND (oper, 1);
+ accurate estimate of the size of the buffer. Since the operand
+ of POINTER_PLUS_EXPR is represented as an unsigned type, convert
+ it to signed first.
+ Otherwise, use the size of the entire array as an optimistic
+ estimate (this may lead to false negatives). */
+ tree adj = TREE_OPERAND (oper, 1);
if (CONSTANT_CLASS_P (adj))
- adjust += tree_to_uhwi (adj);
+ adjust += tree_to_shwi (convert (ssizetype, adj));
else
use_obj_size = true;