summaryrefslogtreecommitdiff
path: root/MdePkg
diff options
context:
space:
mode:
authorArd Biesheuvel <ard.biesheuvel@linaro.org>2016-07-14 14:10:14 +0200
committerArd Biesheuvel <ard.biesheuvel@linaro.org>2016-07-21 13:32:09 +0200
commit357cec385d4f44385b24c299a601afc811abd9b7 (patch)
tree0bdbba29e1b832f45e8b18efd2693c696bfd9a8d /MdePkg
parente78a2a49ee6b0c0d7c6997c87ace31d7761cf636 (diff)
downloadedk2-platforms-357cec385d4f44385b24c299a601afc811abd9b7.tar.xz
MdePkg: avoid __builtin_unreachable() on GCC v4.4
GCC v4.4 does not implement __builtin_unreachable(), so avoid using it when building with this version or earlier. Contributed-under: TianoCore Contribution Agreement 1.0 Signed-off-by: Ard Biesheuvel <ard.biesheuvel@linaro.org> Reviewed-by: Jordan Justen <jordan.l.justen@intel.com> Tested-by: Laszlo Ersek <lersek@redhat.com> Tested-By: Liming Gao <liming.gao@intel.com> Reviewed-by: Liming Gao <liming.gao@intel.com>
Diffstat (limited to 'MdePkg')
-rw-r--r--MdePkg/Include/Base.h3
1 files changed, 2 insertions, 1 deletions
diff --git a/MdePkg/Include/Base.h b/MdePkg/Include/Base.h
index 858385828d..7dbf9386b6 100644
--- a/MdePkg/Include/Base.h
+++ b/MdePkg/Include/Base.h
@@ -89,10 +89,11 @@ VERIFY_SIZE_OF (CHAR16, 2);
// warnings.
//
#ifndef UNREACHABLE
- #ifdef __GNUC__
+ #if __GNUC__ > 4 || (__GNUC__ == 4 && __GNUC_MINOR__ > 4)
///
/// Signal compilers and analyzers that this call is not reachable. It is
/// up to the compiler to remove any code past that point.
+ /// Not implemented by GCC 4.4 or earlier.
///
#define UNREACHABLE() __builtin_unreachable ()
#elif defined (__has_feature)