[Committed,obvious] Testsuite: Fix failures in g++.dg/analyzer/placement-new-size.C

Message ID 20231222022901.1253705-1-sandra@codesourcery.com
State Unresolved
Headers
Series [Committed,obvious] Testsuite: Fix failures in g++.dg/analyzer/placement-new-size.C |

Checks

Context Check Description
snail/gcc-patch-check warning Git am fail log

Commit Message

Sandra Loosemore Dec. 22, 2023, 2:29 a.m. UTC
  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 | 3 ++-
 1 file changed, 2 insertions(+), 1 deletion(-)
  

Patch

diff --git a/gcc/testsuite/g++.dg/analyzer/placement-new-size.C b/gcc/testsuite/g++.dg/analyzer/placement-new-size.C
index 75a5a159282..f6c7bd4de5f 100644
--- a/gcc/testsuite/g++.dg/analyzer/placement-new-size.C
+++ b/gcc/testsuite/g++.dg/analyzer/placement-new-size.C
@@ -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
+}