Compiler detection - __attribute__((fallthrough)) for clang
Clang supports `__attribute__((fallthrough))`. While C++ sources use [[attribute]], the C codepath still requires a fallback. Pick-to: 6.7 Change-Id: Iaa93d2debc21fdd34e414ddb024b95942ae9191f Reviewed-by: Thiago Macieira <thiago.macieira@intel.com>
This commit is contained in:
parent
75254e1d35
commit
376ff95e93
@ -1222,11 +1222,11 @@
|
||||
#endif
|
||||
#endif
|
||||
#ifndef Q_FALLTHROUGH
|
||||
# if defined(Q_CC_GNU_ONLY) && Q_CC_GNU >= 700
|
||||
# ifdef Q_CC_GNU
|
||||
# define Q_FALLTHROUGH() __attribute__((fallthrough))
|
||||
# else
|
||||
# define Q_FALLTHROUGH() (void)0
|
||||
#endif
|
||||
# endif
|
||||
#endif
|
||||
|
||||
|
||||
|
Loading…
x
Reference in New Issue
Block a user