<html>
<head>
<meta http-equiv="Content-Type" content="text/html; charset=us-ascii">
</head>
<body style="word-wrap: break-word; -webkit-nbsp-mode: space; -webkit-line-break: after-white-space; color: rgb(0, 0, 0); font-size: 14px; font-family: Calibri, sans-serif;">
<div>Thank you for your reply. I wonder if clang does not support "pure" attribute at all, or has a different name for it. </div>
<div><br>
</div>
<div>Thanks,</div>
<div>Taewook</div>
<div><br>
</div>
<span id="OLK_SRC_BODY_SECTION">
<div style="font-family:Calibri; font-size:11pt; text-align:left; color:black; BORDER-BOTTOM: medium none; BORDER-LEFT: medium none; PADDING-BOTTOM: 0in; PADDING-LEFT: 0in; PADDING-RIGHT: 0in; BORDER-TOP: #b5c4df 1pt solid; BORDER-RIGHT: medium none; PADDING-TOP: 3pt">
<span style="font-weight:bold">From: </span><<a href="mailto:metafoo@gmail.com">metafoo@gmail.com</a>> on behalf of Richard Smith <<a href="mailto:richard@metafoo.co.uk">richard@metafoo.co.uk</a>><br>
<span style="font-weight:bold">Date: </span>Tuesday, April 5, 2016 at 11:48 AM<br>
<span style="font-weight:bold">To: </span>Taewook Oh <<a href="mailto:twoh@fb.com">twoh@fb.com</a>><br>
<span style="font-weight:bold">Cc: </span>via cfe-dev <<a href="mailto:cfe-dev@lists.llvm.org">cfe-dev@lists.llvm.org</a>><br>
<span style="font-weight:bold">Subject: </span>Re: [cfe-dev] clang builtin function attributes<br>
</div>
<div><br>
</div>
<div>
<div>
<div dir="ltr">
<div class="gmail_extra">
<div class="gmail_quote">On Tue, Apr 5, 2016 at 11:28 AM, Taewook Oh via cfe-dev <span dir="ltr">
<<a href="mailto:cfe-dev@lists.llvm.org" target="_blank">cfe-dev@lists.llvm.org</a>></span> wrote:<br>
<blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex">
<div style="word-wrap:break-word;color:rgb(0,0,0);font-size:14px;font-family:Calibri,sans-serif">
<div>Hello, </div>
<div><br>
</div>
<div>Unlike gcc, clang does not provide builtin functions for functions in ctype.h, such as tolower. To generated better optimized code, I'm planning to add these functions as builtins with attributes. Regarding this, I have a few questions:</div>
<div><br>
</div>
<ol>
<li>In "Attributes in Clang" page (<a href="https://urldefense.proofpoint.com/v2/url?u=http-3A__clang.llvm.org_docs_AttributeReference.html&d=CwMFaQ&c=5VD0RTtNlTh3ycd41b3MUw&r=kOsLCgQzH7N8ptZ7diJD9g&m=Q2Jov6ZReuDh4daoAqk_HH2uEZ3C0Cg4ZSEOO63immU&s=vAgJMXrR_WQXR4r2P0R6gFK9E5X6s94A6CfBHEaOhOI&e=" target="_blank">http://clang.llvm.org/docs/AttributeReference.html</a>),
 "nothrow" and "const" are not in the list while they are still used in Builtins.def. Are these attributes deprecated?</li></ol>
</div>
</blockquote>
<div>No, they're just not documented yet. (We'd appreciate patches to include/clang/AttrDocs.td and include/clang/Attr.td if you're feeling enthusiastic, but note that this needs to be original documentation -- it wouldn't be acceptable to copy documentation
 from GCC due to license differences.) <br>
</div>
<blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex">
<div style="word-wrap:break-word;color:rgb(0,0,0);font-size:14px;font-family:Calibri,sans-serif">
<ol>
<li>(Assuming they are not deprecated) Is there a place that I can find definitions for attributes used in builtins.def? In particular, I wonder if "const" attributes of clang has same meaning with gcc's "const" attribute, as it seems that clang does not support
 "pure" attribute.</li></ol>
</div>
</blockquote>
<div>Yes, the attributes listed in clang's Builtins.def are the __attribute__((X)) form, which generally mean the same thing to Clang as they do to GCC (with rare exceptions).<br>
</div>
</div>
</div>
</div>
</div>
</div>
</span>
</body>
</html>