[Openmp-commits] [openmp] 81e51e0 - [openmp][omptest] Include cstdlib for malloc() (#202021)

via Openmp-commits openmp-commits at lists.llvm.org
Sat Jun 6 02:46:50 PDT 2026


Author: Paul Osmialowski
Date: 2026-06-06T10:46:45+01:00
New Revision: 81e51e0aaf7219ebf51b52eae12d5f94e888b9bf

URL: https://github.com/llvm/llvm-project/commit/81e51e0aaf7219ebf51b52eae12d5f94e888b9bf
DIFF: https://github.com/llvm/llvm-project/commit/81e51e0aaf7219ebf51b52eae12d5f94e888b9bf.diff

LOG: [openmp][omptest] Include cstdlib for malloc() (#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.

Added: 
    

Modified: 
    openmp/tools/omptest/src/OmptAssertEvent.cpp

Removed: 
    


################################################################################
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