From e4e4084e0a7ff7480f5bf17a6421803e4b740f6a Mon Sep 17 00:00:00 2001 From: Marc Mutz Date: Wed, 18 Jan 2023 20:34:57 +0100 Subject: [PATCH] qcompilerdetection.h: add Q_COMPILER_MANGLES_ACCESS_SPECIFIER This is similar to Q_COMPILER_MANGLES_RETURN_TYPE, except that the other such compiler, SunPro CC, at least by my cursory reading of https://archive.org/download/SunWorkshopVol5No1/Sun%20WorkShop%E2%84%A2%20for%20Solaris%202.x%20Volume%205%20Number%201.iso/SPROmrcpl%2Freloc%2FSUNWspro%2FSC4.2%2FREADMEs%2Fmangling.ps doesn't appear to mangle the access specifier. So it's only MSVC. It's still better to have a properly-named macro for this than to work with Q_CC_MSVC and, hopefully, an explanatory code comment. May come in handy to maintain BC when we find the need to change an access specifier in the future. The original use-case, in QtPositioning, was fixed differently. If nothing else, let's have it to raise awareness of the issue. Change-Id: Ia8b789d2713ec19487a21c6bb0a12cf285e6ba83 Reviewed-by: Fabian Kosmale Reviewed-by: Thiago Macieira (cherry picked from commit c155216917ff583bcab3d0ec5b59099af3fbea0d) Reviewed-by: Qt Cherry-pick Bot --- src/corelib/global/qcompilerdetection.h | 1 + 1 file changed, 1 insertion(+) diff --git a/src/corelib/global/qcompilerdetection.h b/src/corelib/global/qcompilerdetection.h index db856317be0..621abf65afa 100644 --- a/src/corelib/global/qcompilerdetection.h +++ b/src/corelib/global/qcompilerdetection.h @@ -71,6 +71,7 @@ # endif # define Q_OUTOFLINE_TEMPLATE inline # define Q_COMPILER_MANGLES_RETURN_TYPE +# define Q_COMPILER_MANGLES_ACCESS_SPECIFIER # define Q_FUNC_INFO __FUNCSIG__ # define Q_ASSUME_IMPL(expr) __assume(expr) # define Q_UNREACHABLE_IMPL() __assume(0)