From: "Kinney, Michael D" <michael.d.kinney@intel.com>
To: Michael Zimmermann <sigmaepsilon92@gmail.com>,
"Kinney, Michael D" <michael.d.kinney@intel.com>
Cc: "edk2-devel@lists.01.org" <edk2-devel@lists.01.org>,
Ard Biesheuvel <ard.biesheuvel@linaro.org>,
"Gao, Liming" <liming.gao@intel.com>
Subject: Re: [PATCH 0/3] fix GCC optimizations and warnings for SetJump/LongJump
Date: Fri, 22 Dec 2017 19:01:01 +0000 [thread overview]
Message-ID: <E92EE9817A31E24EB0585FDF735412F5A7DF17CB@ORSMSX113.amr.corp.intel.com> (raw)
In-Reply-To: <CAN9vWDKJjd1FV91OAnOQ674DvwZPSS3MZhVL0xTbGf6W1t+g4w@mail.gmail.com>
Michael,
For many aspects of a function declaration and function implementation the C
compiler requires the headers to match. I think it is good practice to have them match.
In general, when implementing a library instance, you can take a copy of the library
class .h file into a library instance .c file and fill in the body of the functions. When
using this approach, the function headers are always identical.
Mike
From: Michael Zimmermann [mailto:sigmaepsilon92@gmail.com]
Sent: Friday, December 22, 2017 10:27 AM
To: Kinney, Michael D <michael.d.kinney@intel.com>
Cc: edk2-devel@lists.01.org; Ard Biesheuvel <ard.biesheuvel@linaro.org>; Gao, Liming <liming.gao@intel.com>
Subject: Re: [edk2] [PATCH 0/3] fix GCC optimizations and warnings for SetJump/LongJump
Is adding attributes to both header and source files an UEFI coding convention?
Because for the compiler it's only necessary to do that in the header files afaik.
Thanks
Michael
On Fri, Dec 22, 2017 at 6:55 PM, Kinney, Michael D <michael.d.kinney@intel.com<mailto:michael.d.kinney@intel.com>> wrote:
I see the .h file updates here.
I think the C files in MdePkg/Library/BaseLib also need
to be updated for this patch series to be complete.
Thanks,
Mike
> -----Original Message-----
> From: M1cha [mailto:sigmaepsilon92@gmail.com<mailto:sigmaepsilon92@gmail.com>]
> Sent: Thursday, December 21, 2017 11:24 PM
> To: edk2-devel@lists.01.org<mailto:edk2-devel@lists.01.org>
> Cc: Ard Biesheuvel <ard.biesheuvel@linaro.org<mailto:ard.biesheuvel@linaro.org>>; Kinney,
> Michael D <michael.d.kinney@intel.com<mailto:michael.d.kinney@intel.com>>; Gao, Liming
> <liming.gao@intel.com<mailto:liming.gao@intel.com>>
> Subject: [edk2] [PATCH 0/3] fix GCC optimizations and
> warnings for SetJump/LongJump
>
> I've already discussed this in past but never actually
> sent proper
> patches for some reason.
>
> This patch series is about fixing problems with these
> functions when
> using GCC.
>
> M1cha (3):
> MdePkg: add RETURNS_TWICE attribute
> MdePkg/BaseLib: add attribute 'RETURNS_TWICE' to
> SetJump
> MdePkg: add NORETURN attribute to LongJump and
> InternalLongJump
>
> MdePkg/Include/Base.h | 10
> ++++++++++
> MdePkg/Include/Library/BaseLib.h | 2 ++
> MdePkg/Library/BaseLib/BaseLibInternals.h | 1 +
> 3 files changed, 13 insertions(+)
>
> --
> 2.15.1
prev parent reply other threads:[~2017-12-22 18:56 UTC|newest]
Thread overview: 16+ messages / expand[flat|nested] mbox.gz Atom feed top
2017-12-22 7:23 [PATCH 0/3] fix GCC optimizations and warnings for SetJump/LongJump M1cha
2017-12-22 7:23 ` [PATCH 1/3] MdePkg: add RETURNS_TWICE attribute M1cha
2017-12-22 15:24 ` Ard Biesheuvel
2017-12-22 18:27 ` Michael Zimmermann
2017-12-25 3:11 ` Gao, Liming
2017-12-25 15:50 ` Michael Zimmermann
2017-12-26 16:51 ` Gao, Liming
2017-12-26 20:00 ` Michael Zimmermann
2017-12-27 15:56 ` Gao, Liming
2017-12-22 7:23 ` [PATCH 2/3] MdePkg/BaseLib: add attribute 'RETURNS_TWICE' to SetJump M1cha
2017-12-22 15:27 ` Ard Biesheuvel
2017-12-22 7:23 ` [PATCH 3/3] MdePkg: add NORETURN attribute to LongJump and InternalLongJump M1cha
2017-12-22 15:27 ` Ard Biesheuvel
2017-12-22 17:55 ` [PATCH 0/3] fix GCC optimizations and warnings for SetJump/LongJump Kinney, Michael D
2017-12-22 18:26 ` Michael Zimmermann
2017-12-22 19:01 ` Kinney, Michael D [this message]
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=E92EE9817A31E24EB0585FDF735412F5A7DF17CB@ORSMSX113.amr.corp.intel.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