From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received-SPF: Pass (sender SPF authorized) identity=mailfrom; client-ip=209.132.183.28; helo=mx1.redhat.com; envelope-from=lersek@redhat.com; receiver=edk2-devel@lists.01.org Received: from mx1.redhat.com (mx1.redhat.com [209.132.183.28]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by ml01.01.org (Postfix) with ESMTPS id 7ED102194D3B3 for ; Wed, 2 Jan 2019 18:49:12 -0800 (PST) Received: from smtp.corp.redhat.com (int-mx05.intmail.prod.int.phx2.redhat.com [10.5.11.15]) (using TLSv1.2 with cipher AECDH-AES256-SHA (256/256 bits)) (No client certificate requested) by mx1.redhat.com (Postfix) with ESMTPS id 14F75C034DE1; Thu, 3 Jan 2019 02:49:12 +0000 (UTC) Received: from lacos-laptop-7.usersys.redhat.com (ovpn-123-131.rdu2.redhat.com [10.10.123.131]) by smtp.corp.redhat.com (Postfix) with ESMTP id 8DC275D738; Thu, 3 Jan 2019 02:49:10 +0000 (UTC) From: Laszlo Ersek To: edk2-devel-01 Cc: Ard Biesheuvel , Liming Gao , Marvin Haeuser , Michael D Kinney Date: Thu, 3 Jan 2019 03:48:16 +0100 Message-Id: <20190103024816.9236-27-lersek@redhat.com> In-Reply-To: <20190103024816.9236-1-lersek@redhat.com> References: <20190103024816.9236-1-lersek@redhat.com> MIME-Version: 1.0 X-Scanned-By: MIMEDefang 2.79 on 10.5.11.15 X-Greylist: Sender IP whitelisted, not delayed by milter-greylist-4.5.16 (mx1.redhat.com [10.5.110.32]); Thu, 03 Jan 2019 02:49:12 +0000 (UTC) Subject: [PATCH 26/26] Revert "MdePkg: avoid __builtin_unreachable() on GCC v4.4" X-BeenThere: edk2-devel@lists.01.org X-Mailman-Version: 2.1.29 Precedence: list List-Id: EDK II Development List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Thu, 03 Jan 2019 02:49:12 -0000 Content-Transfer-Encoding: 8bit This reverts commit 357cec385d4f ("MdePkg: avoid __builtin_unreachable() on GCC v4.4", 2016-07-21). We've removed BaseTools support for GCC44..GCC47, therefore we need not catch the GCC44 corner case for __builtin_unreachable(). No GCC44..GCC47 references remain under MdePkg after this patch. Cc: Ard Biesheuvel Cc: Liming Gao Cc: Marvin Haeuser Cc: Michael D Kinney Ref: https://bugzilla.tianocore.org/show_bug.cgi?id=1377 Signed-off-by: Laszlo Ersek --- Notes: I build-tested this change by building ArmVirtQemu with the GCC5 toolchain (gcc-6.1.1), and OVMF with the GCC48 toolchain (gcc-4.8.5). Namely, the PeiCore() function [MdeModulePkg/Core/Pei/PeiMain/PeiMain.c] and the DxeMain() function [MdeModulePkg/Core/Dxe/DxeMain/DxeMain.c] use UNREACHABLE(). MdePkg/Include/Base.h | 3 +-- 1 file changed, 1 insertion(+), 2 deletions(-) diff --git a/MdePkg/Include/Base.h b/MdePkg/Include/Base.h index bc877d8125a5..d6b04baeaf8b 100644 --- a/MdePkg/Include/Base.h +++ b/MdePkg/Include/Base.h @@ -112,11 +112,10 @@ VERIFY_SIZE_OF (__VERIFY_UINT32_ENUM_SIZE, 4); // warnings. // #ifndef UNREACHABLE - #if __GNUC__ > 4 || (__GNUC__ == 4 && __GNUC_MINOR__ > 4) + #ifdef __GNUC__ /// /// 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) -- 2.19.1.3.g30247aa5d201