From mboxrd@z Thu Jan 1 00:00:00 1970 Received: from mail-wr1-f66.google.com (mail-wr1-f66.google.com [209.85.221.66]) by mx.groups.io with SMTP id smtpd.web12.38329.1595253889899730555 for ; Mon, 20 Jul 2020 07:04:50 -0700 Authentication-Results: mx.groups.io; dkim=pass header.i=@nuviainc-com.20150623.gappssmtp.com header.s=20150623 header.b=lcmtC8pm; spf=pass (domain: nuviainc.com, ip: 209.85.221.66, mailfrom: leif@nuviainc.com) Received: by mail-wr1-f66.google.com with SMTP id r12so17892539wrj.13 for ; Mon, 20 Jul 2020 07:04:49 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=nuviainc-com.20150623.gappssmtp.com; s=20150623; h=date:from:to:cc:subject:message-id:references:mime-version :content-disposition:in-reply-to:user-agent; bh=UTAl/lpEm3hgWPx42b5WQN9J2Xv9QP1fmlqBWEFJUSY=; b=lcmtC8pmVL+ubnPbdStCdlgy36Mo1UG8DF6WCymnK8qDZaUZvwPBa9abhGakdNUGtg D2GB5s++dMf5wBas3fytN1U8ITGIBQ3I2t3BV9Z9qDrDdWP1xMcxMFEdCxU0qUVx57Yo lm9W67kR2ffVxJv4VDmPbAKVjAxEdBAmm6a+7mY6UEV6plZk1FXTJVFS3a++xE9jzN+M h7G6Q8Vg/g7YpnvreiEJzNAwGToO8nE3Kqa+sknr75cxZwuswGls057yp7tibpxbFCCM FpTRfIZr0T9ZuITNe+jx5wSCymCWe8odklrKvIpW2dJYNsz3usYlsmHUXSEfJSZvPtbN F1ug== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:date:from:to:cc:subject:message-id:references :mime-version:content-disposition:in-reply-to:user-agent; bh=UTAl/lpEm3hgWPx42b5WQN9J2Xv9QP1fmlqBWEFJUSY=; b=IrSp40jtqhBS3lDRraWkCCrwXqFRtK4C3rr47reWR1EvAOrGW/ziEJry+tP+JQTK6B aZt/ZClF42UHMFMdpdB4pPuX3va4SwYkwaHflZ/GfszSstso+wgXYjtt09WcnUpk7ZyX pbxr+8KTXv9kCOxw3HJfM24R4zpYGGTLgY1VohAmNkqIVPB2mxRNg3zT1RmvqChXDrKn bhkYivJ2V39/O8tE9h9KA4ENTICmHzzUOeCxk9Yl/4X/RtwwVxA3pEpUQ8LbglcPxKq4 TtxL+Ao8foDDjk7gvsFg4snQo/gjcbxGubYQwOhrGEnbUqtdPvUrEUdbec9WUy2ewnnd C+/w== X-Gm-Message-State: AOAM5337ZNj5odj9HG7wArc4RHwkRyHu8Oml6QXkRqcalBCuGeO02nxj lHIknBENWvHPvRqYNlXLHpio2A== X-Google-Smtp-Source: ABdhPJwNDhH+gsjQU9ew3MuMJwaJea+JtZSXxf7ZVv4kedl0U1oKu4blc+2qrGsA/7GtzWMUWFAOsQ== X-Received: by 2002:adf:9f12:: with SMTP id l18mr9883346wrf.35.1595253888529; Mon, 20 Jul 2020 07:04:48 -0700 (PDT) Return-Path: Received: from vanye ([2001:470:1f09:12f0:b26e:bfff:fea9:f1b8]) by smtp.gmail.com with ESMTPSA id 5sm31013479wmk.9.2020.07.20.07.04.47 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Mon, 20 Jul 2020 07:04:48 -0700 (PDT) Date: Mon, 20 Jul 2020 15:04:46 +0100 From: "Leif Lindholm" To: Jessica Clarke Cc: devel@edk2.groups.io, Michael D Kinney , Liming Gao Subject: Re: [PATCH] MdePkg Base.h: Delete prototype for __builtin_return_address Message-ID: <20200720140446.GP12303@vanye> References: <20200720134946.33723-1-jrtc27@jrtc27.com> MIME-Version: 1.0 In-Reply-To: <20200720134946.33723-1-jrtc27@jrtc27.com> User-Agent: Mutt/1.10.1 (2018-07-13) Content-Type: text/plain; charset=us-ascii Content-Disposition: inline +Mike, Liming On Mon, Jul 20, 2020 at 14:49:46 +0100, Jessica Clarke wrote: > 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); Agreed this looks somewhat bonkers. And I can't see any ill effects from dropping it, so: Reviewed-by: Leif Lindholm > /** > Get the return address of the calling function. > > -- > 2.20.1 >