]> git.ipfire.org Git - thirdparty/gcc.git/commitdiff
Testsuite: Fix failures in g++.dg/analyzer/placement-new-size.C
authorSandra Loosemore <sandra@codesourcery.com>
Fri, 22 Dec 2023 02:10:32 +0000 (02:10 +0000)
committerSandra Loosemore <sandra@codesourcery.com>
Fri, 22 Dec 2023 02:27:05 +0000 (02:27 +0000)
This testcase was failing on uses of int8_t, int64_t, etc without
including <stdint.h>.

gcc/testsuite/ChangeLog
* g++.dg/analyzer/placement-new-size.C: Include <stdint.h>.  Also
add missing newline to end of file.

gcc/testsuite/g++.dg/analyzer/placement-new-size.C

index 75a5a159282b02e3e2a1b7a772f006f999ee74bc..f6c7bd4de5fd276bf1ca757cf7a196eb00f341a4 100644 (file)
@@ -2,6 +2,7 @@
 
 #include <new>
 #include <stdlib.h>
+#include <stdint.h>
 
 extern int get_buf_size ();
 
@@ -34,4 +35,4 @@ void test_binop ()
   int32_t *i = ::new (p + 1) int32_t; /* { dg-warning "heap-based buffer overflow" } */
   *i = 42; /* { dg-warning "heap-based buffer overflow" } */
   free (p);
-}
\ No newline at end of file
+}