[Openmp-commits] [openmp] [openmp][omptest] Include cstdlib for malloc() (PR #202021)
Paul Osmialowski via Openmp-commits
openmp-commits at lists.llvm.org
Sat Jun 6 02:31:29 PDT 2026
https://github.com/pawosm-arm created https://github.com/llvm/llvm-project/pull/202021
This is to address the error appearing when building this code with somewhat more recent compilers:
```
Use of undeclared identifier 'malloc'
```
Such inclusion has already been added to the OmptTester.cpp file.
>From ae17bdb4cae3173b87ac03ea2e618f0eb15b56d4 Mon Sep 17 00:00:00 2001
From: Paul Osmialowski <pawel.osmialowski at arm.com>
Date: Sat, 6 Jun 2026 10:23:04 +0100
Subject: [PATCH] [openmp][omptest] Include cstdlib for malloc()
This is to address the error appearing when building this code with
somewhat more recent compilers:
```
Use of undeclared identifier 'malloc'
```
Such inclusion has already been added to the OmptTester.cpp file.
---
openmp/tools/omptest/src/OmptAssertEvent.cpp | 2 ++
1 file changed, 2 insertions(+)
diff --git a/openmp/tools/omptest/src/OmptAssertEvent.cpp b/openmp/tools/omptest/src/OmptAssertEvent.cpp
index a5a2e7969e980..364728919502b 100644
--- a/openmp/tools/omptest/src/OmptAssertEvent.cpp
+++ b/openmp/tools/omptest/src/OmptAssertEvent.cpp
@@ -14,6 +14,8 @@
#include "OmptAssertEvent.h"
#include <omp-tools.h>
+#include <cstdlib>
+
using namespace omptest;
const char *omptest::to_string(ObserveState State) {
More information about the Openmp-commits
mailing list