From: "Pedro Falcato" <pedro.falcato@gmail.com>
To: devel@edk2.groups.io, michael.d.kinney@intel.com
Cc: "Pop, Aaron" <aaronpop@microsoft.com>
Subject: Re: [edk2-devel] GoogleTest Compatibility with MdePkg's IndustyStandard header files
Date: Wed, 24 May 2023 22:55:15 +0100 [thread overview]
Message-ID: <CAKbZUD0RR9e4jgBVVUEqxrxH-GOQvoSOOV91uj8fWjOMvB-atQ@mail.gmail.com> (raw)
In-Reply-To: <CO1PR11MB49290A91C55F0D98A89BE1D4D2419@CO1PR11MB4929.namprd11.prod.outlook.com>
On Wed, May 24, 2023 at 10:23 PM Michael D Kinney
<michael.d.kinney@intel.com> wrote:
>
> After trying a few GCC experiments, there does not appear to be any way to work around “xor” keyword.
>
>
>
> I recommend we update EDK II sources to not use c++ keywords to avoid this issue all together.
>
>
>
> This may require changes that do not match names from industry standard specs.
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 code.
Although yes, avoiding C++ keywords is a good idea, particularly if
you're planning to bring more C++ into edk2.
--
Pedro
next prev parent reply other threads:[~2023-05-24 21:55 UTC|newest]
Thread overview: 11+ messages / expand[flat|nested] mbox.gz Atom feed top
2023-05-23 0:40 GoogleTest Compatibility with MdePkg's IndustyStandard header files aaronpop
2023-05-24 19:49 ` Michael D Kinney
2023-05-24 20:07 ` Aaron Pop
2023-05-24 21:23 ` Michael D Kinney
2023-05-24 21:55 ` Pedro Falcato [this message]
2023-05-25 0:23 ` [edk2-devel] " Michael D Kinney
2023-05-25 9:44 ` Pedro Falcato
2023-05-25 17:06 ` Michael D Kinney
2023-05-25 17:43 ` Oliver Smith-Denny
2023-05-25 18:01 ` Pedro Falcato
2023-05-25 18:22 ` Michael D Kinney
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-list from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=CAKbZUD0RR9e4jgBVVUEqxrxH-GOQvoSOOV91uj8fWjOMvB-atQ@mail.gmail.com \
--to=devel@edk2.groups.io \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox