From mboxrd@z Thu Jan 1 00:00:00 1970 Received: from mail-wr1-f68.google.com (mail-wr1-f68.google.com [209.85.221.68]) by mx.groups.io with SMTP id smtpd.web10.38410.1595252994889496270 for ; Mon, 20 Jul 2020 06:49:55 -0700 Authentication-Results: mx.groups.io; dkim=pass header.i=@jrtc27.com header.s=gmail.jrtc27.user header.b=YwAQbPuZ; spf=pass (domain: jrtc27.com, ip: 209.85.221.68, mailfrom: jrtc27@jrtc27.com) Received: by mail-wr1-f68.google.com with SMTP id o11so17930433wrv.9 for ; Mon, 20 Jul 2020 06:49:54 -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:mime-version :content-transfer-encoding; bh=wotb8bxBWwuTvYj0+uHsTGdabCONfCHMfjr2sjE3fWw=; b=YwAQbPuZT+rict4cIL3WXIWavqYSIEqvk/9Fu/9YLMMTBUMqcqJQwMKuGr1ZigcGT4 wN6jKr3olQ94nbrc7ASG5lF8h4KlWwKLVzp0RKij6YMb0HA8AxYLFiqtwU5Kvgq/feuy Okqf1AZq+eZoMNI/8qpSN95JdWWO+/+tH+NXXTiLPCMBKAZQ2ByNlDq+BbKQ5kxe8fm2 JR+9/w6K8I1EutGer0lqRaoVBmV7QQMyKV//Du0ukquUwZF3+fCqqgujBh/ZlwbHF1u+ M7vkcmrxL+eEiiRpFfjJZV7OYe0p9rwuN/YTDNLKLn4T6Xiz41BadALRnYteCBOHbNq9 hYfw== 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:mime-version :content-transfer-encoding; bh=wotb8bxBWwuTvYj0+uHsTGdabCONfCHMfjr2sjE3fWw=; b=EZm7TRK7PCWLMlg1VN7Gz6YtjAk68/P50Fbp/0wBmEdKawj23zAetn6T/pj2O5S59L hljJc1tN5/135d3z9MV1X/BJYNFi3F+nLZgdhhneJC5ZdILVintdITH8M6b/cH4Pee+e 0bVwsm/kGDU6h4YUgU1nVXk/wLgTthVpld9Jcm9NVTwic6wl+wHGAWN954btoB7EJUgV y+E71UQM3kORmn97nwA9pdjMN2pQs9KFJDR71Cc72XMXwLUACoPHRYUK0tz8w1jUGIp1 3fL4kjXqVUNH2/CDIfYfnwaN3bN8fOIxUHYAcRpauZcn2HTR4/X97peWDlbJLwxBPGRC WRqA== X-Gm-Message-State: AOAM5324PCuvgXMl5NoVHOBnXOSkKjIv/mwq/J2bfwxJ5naCuAo04Ezw zMI8pOxyu7JUEIO2Eyl31XZhEWU/ZHw= X-Google-Smtp-Source: ABdhPJxf4w97MsRimGPE7ZyK6jgvEk3myxfiecxrFS04mass4lcoAuLKfITIofrlS5n0RAbRy/9LHA== X-Received: by 2002:a5d:4a41:: with SMTP id v1mr13274615wrs.371.1595252993105; Mon, 20 Jul 2020 06:49:53 -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 x11sm16026403wrl.28.2020.07.20.06.49.52 (version=TLS1_2 cipher=ECDHE-ECDSA-CHACHA20-POLY1305 bits=256/256); Mon, 20 Jul 2020 06:49:52 -0700 (PDT) Received: by Jessicas-MacBook.local (Postfix, from userid 501) id E7F82207A913E0; Mon, 20 Jul 2020 14:49:51 +0100 (BST) From: Jessica Clarke To: devel@edk2.groups.io Cc: Jessica Clarke , Leif Lindholm Subject: [PATCH] MdePkg Base.h: Delete prototype for __builtin_return_address Date: Mon, 20 Jul 2020 14:49:46 +0100 Message-Id: <20200720134946.33723-1-jrtc27@jrtc27.com> X-Mailer: git-send-email 2.20.1 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] https://github.com/llvm/llvm-project/commit/41af97137572ad6d4dafc872e7ecf6bbb08d4984 Cc: Leif Lindholm Signed-off-by: Jessica Clarke --- 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