* [Committed, obvious] Testsuite: Fix failures in g++.dg/analyzer/placement-new-size.C
@ 2023-12-22 2:29 Sandra Loosemore
0 siblings, 0 replies; only message in thread
From: Sandra Loosemore @ 2023-12-22 2:29 UTC (permalink / raw)
To: gcc-patches
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(-)
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
+}
--
2.31.1
^ permalink raw reply [flat|nested] only message in thread
only message in thread, other threads:[~2023-12-22 2:29 UTC | newest]
Thread overview: (only message) (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2023-12-22 2:29 [Committed, obvious] Testsuite: Fix failures in g++.dg/analyzer/placement-new-size.C Sandra Loosemore
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).