From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received-SPF: Pass (sender SPF authorized) identity=mailfrom; client-ip=2607:f8b0:4003:c06::242; helo=mail-oi0-x242.google.com; envelope-from=sigmaepsilon92@gmail.com; receiver=edk2-devel@lists.01.org Received: from mail-oi0-x242.google.com (mail-oi0-x242.google.com [IPv6:2607:f8b0:4003:c06::242]) (using TLSv1.2 with cipher ECDHE-RSA-AES128-GCM-SHA256 (128/128 bits)) (No client certificate requested) by ml01.01.org (Postfix) with ESMTPS id A9CBA21CB87A8 for ; Mon, 25 Dec 2017 07:45:36 -0800 (PST) Received: by mail-oi0-x242.google.com with SMTP id r63so22685586oia.6 for ; Mon, 25 Dec 2017 07:50:29 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20161025; h=mime-version:in-reply-to:references:from:date:message-id:subject:to :cc; bh=aGvjeHjrrkAgHQlfXFXMTUfFlP8dRTq+N8hcR0PA4l8=; b=UnBuJZNKbpDamwjz8MWzIEXSMp/QMQ77FQYpYamncknB0tz3rwb54bFGKeunTNNvYZ TZVVMngNBlccqiOzfyo0ph6fB0qL7+5DiOF0lH9AD6dOKOZl7TLLWsGlpL4AbTjfQokQ GW0kBSSJVcp6Kafu3L3kvBWVYPSXG4td/r9fsz/A6SUxs1fdiGvCGLvByngdLnBDiZH7 L2wnGo9A/KkgQHjNYDxrCAOA6XDkmWCwhRZwHokfO+dsQEEAdDCbihr2zAb899K3rHhM Xmob6BE/xp/qE3oPpQzKheVR7WP6zSwsdxFbryQUAi+Dg+UgqzYPuH0T5HPO++dP2/BF xxaw== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:mime-version:in-reply-to:references:from:date :message-id:subject:to:cc; bh=aGvjeHjrrkAgHQlfXFXMTUfFlP8dRTq+N8hcR0PA4l8=; b=qooE33o2uLaJOzZf2eRmRMv3ncmEqmtpy613MN33mxOUegSCbbYxFVGNm/Kb5bTBMw 6YO+4om0lKBxTbQuSUVg8oezTVPZ2HjsbLx30YtnPfzeiUZzVGH65H23AJIn8fsifVzI KaQPO48vqzJQLG5iiPrZStHH/b1ZvJByoO/3oS9thwHUywL5XYd3nbX2i6SYg00UAAS7 9ShVQzv5XuekpyPmNods/t8uceap1ApUCBz7fUhZhKCirH8cc+u1FkB9+vQRu0kT3iRT zhBN2n1/a/PO+vfMsDRyr2VN7HPSrqLkRX8ysB6EJcwNlFWo++zUPoVEAgRMSYoUE367 QD6Q== X-Gm-Message-State: AKGB3mKu+BPCv8ZzCD5qvh731KVWJ5K7Cp23O8f3V6/GBUjSKB/CGYJ1 6MR+a4RyfhyknYXopUATSei9EkUB6MFS0ZagHAw= X-Google-Smtp-Source: ACJfBov2nyIxxQgBkgZnYIz61uwypWIKlP8fPhGBUsdkz/lpl6AvjUrTT/+qB5bohYEkNP+/ZuXJe6Dek79C6fdGZNw= X-Received: by 10.202.55.6 with SMTP id e6mr16530842oia.3.1514217028846; Mon, 25 Dec 2017 07:50:28 -0800 (PST) MIME-Version: 1.0 Received: by 10.157.68.230 with HTTP; Mon, 25 Dec 2017 07:50:28 -0800 (PST) In-Reply-To: <4A89E2EF3DFEDB4C8BFDE51014F606A14E1961C7@SHSMSX104.ccr.corp.intel.com> References: <20171222072336.23504-1-sigmaepsilon92@gmail.com> <20171222072336.23504-2-sigmaepsilon92@gmail.com> <4A89E2EF3DFEDB4C8BFDE51014F606A14E1961C7@SHSMSX104.ccr.corp.intel.com> From: Michael Zimmermann Date: Mon, 25 Dec 2017 16:50:28 +0100 Message-ID: To: "Gao, Liming" Cc: Ard Biesheuvel , "edk2-devel@lists.01.org" , "Kinney, Michael D" X-Content-Filtered-By: Mailman/MimeDel 2.1.23 Subject: Re: [PATCH 1/3] MdePkg: add RETURNS_TWICE attribute X-BeenThere: edk2-devel@lists.01.org X-Mailman-Version: 2.1.23 Precedence: list List-Id: EDK II Development List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Mon, 25 Dec 2017 15:45:37 -0000 Content-Type: text/plain; charset="UTF-8" Liming: The other macros have comments both before the compiler directives and before each define for each compiler. To me it looks like these are slightly differently formulated only and kinda redundant too. Is there a rule or do you have suggestions for writing comments for this kind of macro? On Mon, Dec 25, 2017 at 4:11 AM, Gao, Liming wrote: > Micha: > Could you add comments for new macro RETURNS_TWICE like others, such as > ANALYZER_NORETURN? > > >-----Original Message----- > >From: Ard Biesheuvel [mailto:ard.biesheuvel@linaro.org] > >Sent: Friday, December 22, 2017 11:24 PM > >To: M1cha > >Cc: edk2-devel@lists.01.org; Kinney, Michael D > >; Gao, Liming > >Subject: Re: [edk2] [PATCH 1/3] MdePkg: add RETURNS_TWICE attribute > > > >On 22 December 2017 at 07:23, M1cha wrote: > >> Contributed-under: TianoCore Contribution Agreement 1.1 > >> Signed-off-by: Michael Zimmermann > >> --- > >> MdePkg/Include/Base.h | 10 ++++++++++ > >> 1 file changed, 10 insertions(+) > >> > >> diff --git a/MdePkg/Include/Base.h b/MdePkg/Include/Base.h > >> index 22ab5d3715fb..c863de407418 100644 > >> --- a/MdePkg/Include/Base.h > >> +++ b/MdePkg/Include/Base.h > >> @@ -218,6 +218,16 @@ VERIFY_SIZE_OF (__VERIFY_UINT32_ENUM_SIZE, > >4); > >> #endif > >> #endif > >> > >> +#ifndef RETURNS_TWICE > >> + #if defined (__GNUC__) || defined (__clang__) > >> + #define RETURNS_TWICE __attribute__((returns_twice)) > >> + #elif defined(_MSC_EXTENSIONS) && !defined(MDE_CPU_EBC) > >> + #define RETURNS_TWICE > >> + #else > >> + #define RETURNS_TWICE > > > >What is the point of having two versions that are #defined to nothing? > > > >> + #endif > >> +#endif > >> + > >> // > >> // For symbol name in assembly code, an extra "_" is sometimes > necessary > >> // > >> -- > >> 2.15.1 > >> >