From 644bd3367c342bc55f2cd612af7c0df7b3ddc12a 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 Pick-to: 6.6 Reviewed-by: Thiago Macieira --- 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 51b9bc10181..3bbb0ff4fdf 100644 --- a/src/corelib/global/qcompilerdetection.h +++ b/src/corelib/global/qcompilerdetection.h @@ -1389,7 +1389,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