From mboxrd@z Thu Jan 1 00:00:00 1970 Received: from mail-pg1-f177.google.com (mail-pg1-f177.google.com [209.85.215.177]) by mx.groups.io with SMTP id smtpd.web11.7164.1684965327079585740 for ; Wed, 24 May 2023 14:55:27 -0700 Authentication-Results: mx.groups.io; dkim=fail reason="signature has expired" header.i=@gmail.com header.s=20221208 header.b=hX+cir5W; spf=pass (domain: gmail.com, ip: 209.85.215.177, mailfrom: pedro.falcato@gmail.com) Received: by mail-pg1-f177.google.com with SMTP id 41be03b00d2f7-5289ce6be53so251985a12.0 for ; Wed, 24 May 2023 14:55:27 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20221208; t=1684965326; x=1687557326; h=content-transfer-encoding:cc:to:subject:message-id:date:from :in-reply-to:references:mime-version:from:to:cc:subject:date :message-id:reply-to; bh=I1+c48gVE16yvOeyZwWkjpLXjD0wtgNo/iGupllxyxY=; b=hX+cir5W3/DOMYfSk41fH2hzVZGM6kxASqg5TSzpwPYXdX9xaeUFxlFZBGMZDsQ+v7 rCILqRdLTh/GmfbSEWDYFetTls7N9vgwoMNMG/9EHvxRez2VcjH417Ws6FJZIAU+FBft DgPaWr1kuYwHSvbh8eWo6zmASBIYuHExRpWAq1htJIfMrORKuDM84gF66R6dNuP408Le HvikUjnRv5oeoTwmOEQbAdvrv5ASJSXfthAkse+EGAHDtTtnt53GMGnURBZ4XkEt4AwR olfr6j8+fxGxWeEEV++EUn7fIGCKRkdHKdcbyKzZOz9c3xLc8u7AU73U7uyI5Z6jIt0n hFvA== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20221208; t=1684965326; x=1687557326; h=content-transfer-encoding:cc:to:subject:message-id:date:from :in-reply-to:references:mime-version:x-gm-message-state:from:to:cc :subject:date:message-id:reply-to; bh=I1+c48gVE16yvOeyZwWkjpLXjD0wtgNo/iGupllxyxY=; b=bt1UIPj2NhrOiq2hegY4BapkuK8EqThRDjFklewZQAa4cSv5ACPdkMRvLsg9wmKLdD Xd71WozkUkRB0/U3mvplaBbqxe4J8NU5WqDtQ2PfWQdHzswCcFTgQIKuoZTNgeAo8pRr /E8S9gFGnB4DOY5Pgqgm21zCKTW/aM1AXz1bjnBXLtBlFEaHmkJGTpnFHFYdkus2L/fx Ryx/HZeRqPe/juQbU99IRNGi+dfRlf/CQZILBpJGxkl0wds1ek/abHPs5BABmiCPO9EP 44A5Q/ZOmgzzeP/yl55BtnGkhZmMoa3UX62oXetkavY3g3f1s21gM6ZoIEZR3Ze8NBbK LZEQ== X-Gm-Message-State: AC+VfDx+ZTICJbbDsC6iPLMFFq7yIROLf3Xa74JtOkXaLEV4O0k/NSwn eBja/NudUOmu3zlIMVtyQSAd8CwE07Lmh/8Ln1evn4ChPok= X-Google-Smtp-Source: ACHHUZ4530YvY/O4+lbFlbih25jrCyZ7Fgztg6k1fuCgNnFo1Rv3fvo667Utz3G7R+kZoiLx1duH/ZNkAEcSPYt5Mlo= X-Received: by 2002:a17:902:c407:b0:1af:cbdb:9772 with SMTP id k7-20020a170902c40700b001afcbdb9772mr806932plk.18.1684965326191; Wed, 24 May 2023 14:55:26 -0700 (PDT) MIME-Version: 1.0 References: In-Reply-To: From: "Pedro Falcato" Date: Wed, 24 May 2023 22:55:15 +0100 Message-ID: Subject: Re: [edk2-devel] GoogleTest Compatibility with MdePkg's IndustyStandard header files To: devel@edk2.groups.io, michael.d.kinney@intel.com Cc: "Pop, Aaron" Content-Type: text/plain; charset="UTF-8" Content-Transfer-Encoding: quoted-printable On Wed, May 24, 2023 at 10:23=E2=80=AFPM Michael D Kinney wrote: > > After trying a few GCC experiments, there does not appear to be any way t= o work around =E2=80=9Cxor=E2=80=9D keyword. > > > > I recommend we update EDK II sources to not use c++ keywords to avoid thi= s issue all together. > > > > This may require changes that do not match names from industry standard s= pecs. This is a crappy problem but it's workaroundable in the header by using something like: #ifdef __cplusplus #define SOME_MEMBER_NAME alternative_name #else #define SOME_MEMBER_NAME bad_name #endif and then in the struct... struct Foo { UINTN SOME_MEMBER_NAME; }; It should work around these C++ issues while keeping compat with existing c= ode. Although yes, avoiding C++ keywords is a good idea, particularly if you're planning to bring more C++ into edk2. --=20 Pedro