From mboxrd@z Thu Jan 1 00:00:00 1970 Received: from mga02.intel.com (mga02.intel.com [134.134.136.20]) by mx.groups.io with SMTP id smtpd.web12.887.1585031565910821581 for ; Mon, 23 Mar 2020 23:32:46 -0700 Authentication-Results: mx.groups.io; dkim=missing; spf=pass (domain: intel.com, ip: 134.134.136.20, mailfrom: zhiguang.liu@intel.com) IronPort-SDR: C0HpA28IvUZDqOUKNtdaj2gvwpzK6D7hu+a9PwTdgTDSZ+PD5Q+E29XZa9rdnHG+jAlm4UYZrm Rrg1uTZotDlg== X-Amp-Result: SKIPPED(no attachment in message) X-Amp-File-Uploaded: False Received: from orsmga003.jf.intel.com ([10.7.209.27]) by orsmga101.jf.intel.com with ESMTP/TLS/ECDHE-RSA-AES256-GCM-SHA384; 23 Mar 2020 23:21:11 -0700 IronPort-SDR: ZdlCkmuiBdFdPr/J20Xp5KXajq5o4WLqfVAhR+5NpKcLg0uPzbx2Mp+3h5Afui7n/kG6yjT1AW LqQ3h4HFq17Q== X-ExtLoop1: 1 X-IronPort-AV: E=Sophos;i="5.72,299,1580803200"; d="scan'208";a="246440562" Received: from fieedk002.ccr.corp.intel.com ([10.239.158.178]) by orsmga003.jf.intel.com with ESMTP; 23 Mar 2020 23:21:10 -0700 From: "Zhiguang Liu" To: devel@edk2.groups.io Cc: Vitaly Cheptsov , Liming Gao , Michael D Kinney Subject: [PATCH 2/2] MdePkg: Use __clang__ to decide if using clang or not Date: Tue, 24 Mar 2020 14:20:45 +0800 Message-Id: <20200324062045.2263-2-zhiguang.liu@intel.com> X-Mailer: git-send-email 2.25.1.windows.1 In-Reply-To: <20200324062045.2263-1-zhiguang.liu@intel.com> References: <20200324062045.2263-1-zhiguang.liu@intel.com> MIME-Version: 1.0 Content-Transfer-Encoding: quoted-printable REF: https://bugzilla.tianocore.org/show_bug.cgi?id=3D2628 After switching CLANGPDB's IA32 target to i686-unknown-windows, clang will define _MSC_EXTENSIONS and _MSC_VER. Use __clang__ to decide if using clang. CC: Vitaly Cheptsov CC: Liming Gao CC: Michael D Kinney Signed-off-by: Zhiguang Liu --- MdePkg/Include/Base.h | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/MdePkg/Include/Base.h b/MdePkg/Include/Base.h index 85a091b9d5..c6da816aa9 100644 --- a/MdePkg/Include/Base.h +++ b/MdePkg/Include/Base.h @@ -799,7 +799,7 @@ typedef UINTN *BASE_LIST; **/=0D #ifdef MDE_CPU_EBC=0D #define STATIC_ASSERT(Expression, Message)=0D -#elif defined(_MSC_EXTENSIONS)=0D +#elif defined(_MSC_EXTENSIONS) && !defined(__clang__)=0D #define STATIC_ASSERT static_assert=0D #else=0D #define STATIC_ASSERT _Static_assert=0D --=20 2.25.1.windows.1