From mboxrd@z Thu Jan 1 00:00:00 1970 Received: from mail-wm1-f66.google.com (mail-wm1-f66.google.com [209.85.128.66]) by mx.groups.io with SMTP id smtpd.web11.46957.1595815157109613705 for ; Sun, 26 Jul 2020 18:59:18 -0700 Authentication-Results: mx.groups.io; dkim=pass header.i=@jrtc27.com header.s=gmail.jrtc27.user header.b=fTjSsaWs; spf=pass (domain: jrtc27.com, ip: 209.85.128.66, mailfrom: jrtc27@jrtc27.com) Received: by mail-wm1-f66.google.com with SMTP id f18so3741378wmc.0 for ; Sun, 26 Jul 2020 18:59:16 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=jrtc27.com; s=gmail.jrtc27.user; h=from:to:cc:subject:date:message-id:in-reply-to:references :mime-version:content-transfer-encoding; bh=8606Eq1UzyzBQ2xYXdALkez1qNqv9iNfMlOOynjePfU=; b=fTjSsaWsozbNXnHNJVkkDayOkUn6WgO28Z1wp4RPiI8hGGxXFiNB28+EZB97RQmqdt xwhWgP0BCJeLKRxtbaHGhHp2jxxWxtCm+OI97cchd+orrTId6zqp9Uj+Lw48he7KfEKl hodFni61m6qC/SyZtLTZ3cRk4jSWRfK2PnCOSDiKRoE0xMFmhCNXZdQdJvEqC67az+v9 kThfA96oWEjwNvc6bkrblOE0rY0eCnuvnHoBqNLWRNRWDo4+A+3786RI0l/Sl+k/VUki Rhq1NfeEAuuq3tksLwqGgGOLLqf0zPnw3DF5E3jllDGMcJbzlxGwSug3UyWo6zYny9Zx KkPA== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:from:to:cc:subject:date:message-id:in-reply-to :references:mime-version:content-transfer-encoding; bh=8606Eq1UzyzBQ2xYXdALkez1qNqv9iNfMlOOynjePfU=; b=XjAYlgqZb2Op6Ivt0KzQ+osbrsE+v7jd2fxSDKWhlg6c8MNxhvHtujW07TA/Cmwnmv 9U5siIgITmt0J3/UMzGjsUk4d3RBDt20pNN+amjRhv3OtPx6ZChAhZtLSVH51sXtzF9k 1T+N0AB87bmgls6/NLRFUgDrpTD9naObudvOg5FkzoSyd+Yp7qkXjDX6P6RWd+TWHm5O NJ/b9A13lltGnsv2QOkd5gLL4GIqJUBqEaBDD3W7TZOWHEZxVZAcr2Z2w2wovaKp3mh7 3Xh3nBJ27v6oRPo2jq3YMG+OQ6kn1oVix0rr8DzcH5sBrSgdC7Ha/zGS7I8V2AgCVAUn jwWA== X-Gm-Message-State: AOAM5325+4cJREuUZwvvyLV1ObPwTtUz0PLh3My5URFIxzSUU8NAUSwf 932q9+/DRpiGtCbSE6LxhfVJ36/9Wks= X-Google-Smtp-Source: ABdhPJzhWvP99xm+fN4JP5PrgHMVOk+pmZ3H4/UKWI0oWYip/YFzymbm23GHISm7l65CxbF3WgAEeg== X-Received: by 2002:a1c:9e4c:: with SMTP id h73mr19719177wme.177.1595815155415; Sun, 26 Jul 2020 18:59:15 -0700 (PDT) Return-Path: Received: from Jessicas-MacBook.local (trinity-students-nat.trin.cam.ac.uk. [131.111.193.104]) by smtp.gmail.com with ESMTPSA id c4sm1279412wrt.41.2020.07.26.18.59.14 (version=TLS1_2 cipher=ECDHE-ECDSA-CHACHA20-POLY1305 bits=256/256); Sun, 26 Jul 2020 18:59:14 -0700 (PDT) Received: by Jessicas-MacBook.local (Postfix, from userid 501) id C9BFE207B5EFDF; Mon, 27 Jul 2020 02:59:13 +0100 (BST) From: Jessica Clarke To: devel@edk2.groups.io Cc: Jessica Clarke , "Gao, Liming" , "leif@nuviainc.com" , "Kinney, Michael D" Subject: [PATCH v2] MdePkg Base.h: Delete prototype for __builtin_return_address Date: Mon, 27 Jul 2020 02:58:50 +0100 Message-Id: <20200727015850.16776-1-jrtc27@jrtc27.com> X-Mailer: git-send-email 2.20.1 In-Reply-To: References: MIME-Version: 1.0 Content-Transfer-Encoding: 8bit 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 Signed-off-by: Jessica Clarke --- 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