public inbox for devel@edk2.groups.io
 help / color / mirror / Atom feed
From: "Liming Gao" <liming.gao@intel.com>
To: "devel@edk2.groups.io" <devel@edk2.groups.io>,
	"Gao, Liming" <liming.gao@intel.com>,
	Jessica Clarke <jrtc27@jrtc27.com>
Cc: "leif@nuviainc.com" <leif@nuviainc.com>,
	"Kinney, Michael D" <michael.d.kinney@intel.com>
Subject: Re: [edk2-devel] [PATCH v2] MdePkg Base.h: Delete prototype for __builtin_return_address
Date: Tue, 28 Jul 2020 00:26:24 +0000	[thread overview]
Message-ID: <MWHPR11MB16300B96BE0D636FE9DD305880730@MWHPR11MB1630.namprd11.prod.outlook.com> (raw)
In-Reply-To: <16257A6ED97D2A8D.26462@groups.io>

PR https://github.com/tianocore/edk2/pull/829 has been created. 

-----Original Message-----
From: devel@edk2.groups.io <devel@edk2.groups.io> On Behalf Of Liming Gao
Sent: 2020年7月27日 10:18
To: Jessica Clarke <jrtc27@jrtc27.com>; devel@edk2.groups.io
Cc: leif@nuviainc.com; Kinney, Michael D <michael.d.kinney@intel.com>
Subject: Re: [edk2-devel] [PATCH v2] MdePkg Base.h: Delete prototype for __builtin_return_address

Reviewed-by: Liming Gao <liming.gao@intel.com>

-----Original Message-----
From: Jessica Clarke <jrtc27@jrtc27.com> 
Sent: 2020年7月27日 9:59
To: devel@edk2.groups.io
Cc: Jessica Clarke <jrtc27@jrtc27.com>; Gao, Liming <liming.gao@intel.com>; leif@nuviainc.com; Kinney, Michael D <michael.d.kinney@intel.com>
Subject: [PATCH v2] MdePkg Base.h: Delete prototype for __builtin_return_address

REF: https://bugzilla.tianocore.org/show_bug.cgi?id=1004

Being a compiler builtin, the type of __builtin_return_address is already known to the compiler so no prototype is needed. Clang also errors out when redeclaring certain builtins like this[1], though currently only for ones with custom type checking. At the moment, __builtin_return_address does not use custom type checking and so does not trigger this error, however, the CHERI fork of LLVM, which will form the basis of the toolchain for Arm's experimental Morello platform, does use custom type checking for it, and so gives an error. Thus, simply delete the unnecessary line.

[1] llvm/llvm-project@41af97137572ad6d4dafc872e7ecf6bbb08d4984

Cc: Leif Lindholm <leif@nuviainc.com>
Signed-off-by: Jessica Clarke <jrtc27@jrtc27.com>
---
Changes in v2:
 * Shortened [1] reference to fit column limit. The bug report has the
   full URL already, and this will still link correctly on GitHub.

 MdePkg/Include/Base.h | 1 -
 1 file changed, 1 deletion(-)

diff --git a/MdePkg/Include/Base.h b/MdePkg/Include/Base.h index 85a091b9d5..8e4271f6ea 100644
--- a/MdePkg/Include/Base.h
+++ b/MdePkg/Include/Base.h
@@ -1273,7 +1273,6 @@ typedef UINTN RETURN_STATUS;
   **/
   #define RETURN_ADDRESS(L)     ((L == 0) ? _ReturnAddress() : (VOID *) 0)
 #elif defined (__GNUC__) || defined (__clang__)
-  void * __builtin_return_address (unsigned int level);
   /**
     Get the return address of the calling function.
 
--
2.20.1





  parent reply	other threads:[~2020-07-28  0:26 UTC|newest]

Thread overview: 10+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2020-07-20 13:49 [PATCH] MdePkg Base.h: Delete prototype for __builtin_return_address Jessica Clarke
2020-07-20 14:04 ` Leif Lindholm
2020-07-20 14:58   ` [edk2-devel] " Liming Gao
2020-07-20 15:06     ` Jessica Clarke
2020-07-21  2:29       ` Liming Gao
     [not found]       ` <1623A39CDBDFA4B6.5706@groups.io>
2020-07-23  1:10         ` Liming Gao
2020-07-27  1:58           ` [PATCH v2] " Jessica Clarke
2020-07-27  2:17             ` Liming Gao
     [not found]             ` <16257A6ED97D2A8D.26462@groups.io>
2020-07-28  0:26               ` Liming Gao [this message]
2020-07-21  1:59   ` [edk2-devel] [PATCH] " Zhiguang Liu

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=MWHPR11MB16300B96BE0D636FE9DD305880730@MWHPR11MB1630.namprd11.prod.outlook.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