PR c++/87996 - size of array is negative error when SIZE_MAX/2 < sizeof(array) <...
[gcc.git] / gcc / cp / ChangeLog
index 3cafaaad9336afbaca9134032b4b686ec4398d14..76f22f5e363f32648d474774eb65516a851cafdb 100644 (file)
@@ -1,3 +1,12 @@
+2019-02-11  Martin Sebor  <msebor@redhat.com>
+
+       PR c++/87996
+       * decl.c (compute_array_index_type_loc): Preserve signed sizes
+       for diagnostics.  Call valid_array_size_p instead of error.
+       * init.c (build_new_1): Compute size for diagnostic.  Call
+       invalid_array_size_error
+       (build_new): Call valid_array_size_p instead of error.
+
 2019-02-07  Alexandre Oliva <aoliva@redhat.com>
 
        PR c++/86218