Skip to content

Commit

Permalink
qcompilerdetection.h: add Q_COMPILER_MANGLES_ACCESS_SPECIFIER
Browse files Browse the repository at this point in the history
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.

Pick-to: 6.5
Change-Id: Ia8b789d2713ec19487a21c6bb0a12cf285e6ba83
Reviewed-by: Fabian Kosmale <[email protected]>
Reviewed-by: Thiago Macieira <[email protected]>
  • Loading branch information
marcmutz committed Jan 23, 2023
1 parent 01ef951 commit c155216
Showing 1 changed file with 1 addition and 0 deletions.
1 change: 1 addition & 0 deletions src/corelib/global/qcompilerdetection.h
Original file line number Diff line number Diff line change
Expand Up @@ -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)
Expand Down

0 comments on commit c155216

Please sign in to comment.