Date: Fri, 15 May 2015 17:51:04 +0000 (UTC) From: "Pedro F. Giffuni" <pfg@FreeBSD.org> To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r282981 - head/sys/sys Message-ID: <201505151751.t4FHp4Kx079707@svn.freebsd.org>
next in thread | raw e-mail | index | archive | help
Author: pfg Date: Fri May 15 17:51:03 2015 New Revision: 282981 URL: https://svnweb.freebsd.org/changeset/base/282981 Log: Replace a CONSTCOND for a void value as a replacement for __unreachable builtin This only applies if we are not using clang or gcc but it lets us use the __unreachable() buitin in expressions. Suggested by: tijl Modified: head/sys/sys/cdefs.h Modified: head/sys/sys/cdefs.h ============================================================================== --- head/sys/sys/cdefs.h Fri May 15 15:56:28 2015 (r282980) +++ head/sys/sys/cdefs.h Fri May 15 17:51:03 2015 (r282981) @@ -391,7 +391,7 @@ #if __has_builtin(__builtin_unreachable) || __GNUC_PREREQ__(4, 6) #define __unreachable() __builtin_unreachable() #else -#define __unreachable() do {} while (/*CONSTCOND*/0) +#define __unreachable() ((void)0) #endif #if __has_attribute(alloc_align) || __GNUC_PREREQ__(4, 9)
Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?201505151751.t4FHp4Kx079707>