__builtin_unreachable was added to GCC in version 4.5, so fix macros

Change-Id: Ida63bb46f696ae9d60331d863bf1478415a08ff2
Reviewed-by: Olivier Goffart <ogoffart@woboq.com>
bb10
Thiago Macieira 2012-04-12 15:40:00 -03:00 committed by Qt by Nokia
parent 2a5ade68fd
commit e07cadecc2
1 changed files with 4 additions and 2 deletions

View File

@ -153,8 +153,10 @@
# define Q_UNREACHABLE() __builtin_unreachable()
# else
/* Plain GCC */
# define Q_ASSUME(expr) if (expr){} else __builtin_unreachable()
# define Q_UNREACHABLE() __builtin_unreachable()
# if (__GNUC__ * 100 + __GNUC_MINOR__) >= 405
# define Q_ASSUME(expr) if (expr){} else __builtin_unreachable()
# define Q_UNREACHABLE() __builtin_unreachable()
# endif
# endif
# define Q_ALIGNOF(type) __alignof__(type)