StdLib/Environs: Avoid infinite recursion in _Exit

Use __builtin_unreachable instead of infinite recursion to fix an
infinite recursion error when building StdLib with XCODE5/CLANG38.

Cc: Daryl McDaniel <edk2-lists@mc2research.org>
Cc: Jaben Carsey <jaben.carsey@intel.com>
Contributed-under: TianoCore Contribution Agreement 1.1
Signed-off-by: Alex James <theracermaster@gmail.com>
Reviewed-by: Jaben Carsey <jaben.carsey@intel.com>
This commit is contained in:
Alex James 2018-12-17 20:25:13 -08:00 committed by Jaben Carsey
parent 5f5c60cc2d
commit 19b0fc0a6b
1 changed files with 1 additions and 1 deletions

View File

@ -120,7 +120,7 @@ _Exit(int status)
longjmp(gMD->MainExit, 0x55); // Get out of here. longjmp can't return 0. Use 0x55 for a non-zero value.
#ifdef __GNUC__
_Exit(status); /* Keep GCC happy - never reached */
__builtin_unreachable (); // Keep GCC happy
#endif
}