Compiler detection - __attribute__((fallthrough)) for clang
Clang supports `__attribute__((fallthrough))`. While C++ sources use [[attribute]], the C codepath still requires a fallback. Change-Id: Iaa93d2debc21fdd34e414ddb024b95942ae9191f Reviewed-by: Thiago Macieira <thiago.macieira@intel.com> (cherry picked from commit 376ff95e9308b311038bb316ef36d04244d55b66) Reviewed-by: Qt Cherry-pick Bot <cherrypick_bot@qt-project.org>
This commit is contained in:
parent
9539f527fc
commit
1f57b48346
@ -1222,11 +1222,11 @@
|
|||||||
#endif
|
#endif
|
||||||
#endif
|
#endif
|
||||||
#ifndef Q_FALLTHROUGH
|
#ifndef Q_FALLTHROUGH
|
||||||
# if defined(Q_CC_GNU_ONLY) && Q_CC_GNU >= 700
|
# ifdef Q_CC_GNU
|
||||||
# define Q_FALLTHROUGH() __attribute__((fallthrough))
|
# define Q_FALLTHROUGH() __attribute__((fallthrough))
|
||||||
# else
|
# else
|
||||||
# define Q_FALLTHROUGH() (void)0
|
# define Q_FALLTHROUGH() (void)0
|
||||||
#endif
|
# endif
|
||||||
#endif
|
#endif
|
||||||
|
|
||||||
|
|
||||||
|
Loading…
x
Reference in New Issue
Block a user