From c1ad580dca676d698277796f77522f07f1c24f28 Mon Sep 17 00:00:00 2001 From: Ahmad Samir Date: Fri, 7 Jul 2023 19:28:50 +0300 Subject: [PATCH] qcompilerdetection.h: check __cplusplus is defined before using it Change-Id: I6f6daabcaf393ffa855461b4cd93863723751343 Reviewed-by: Thiago Macieira (cherry picked from commit 644bd3367c342bc55f2cd612af7c0df7b3ddc12a) Reviewed-by: Qt Cherry-pick Bot --- src/corelib/global/qcompilerdetection.h | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/corelib/global/qcompilerdetection.h b/src/corelib/global/qcompilerdetection.h index e733b80a9ba..5525be28a5f 100644 --- a/src/corelib/global/qcompilerdetection.h +++ b/src/corelib/global/qcompilerdetection.h @@ -1376,7 +1376,7 @@ QT_WARNING_DISABLE_MSVC(4530) /* C++ exception handler used, but unwind semantic # endif #endif -#if __cplusplus >= 202002L // P0846 doesn't have a feature macro :/ +#if defined(__cplusplus) && __cplusplus >= 202002L // P0846 doesn't have a feature macro :/ # define QT_COMPILER_HAS_P0846 #endif