<div dir="ltr"><div class="gmail_extra"><div class="gmail_quote">On Sat, Apr 19, 2014 at 4:05 PM, Alp Toker <span dir="ltr"><<a href="mailto:alp@nuanti.com" target="_blank">alp@nuanti.com</a>></span> wrote:<br><blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex">
Small update for the list..<br>
<br>
We discussed this at LLVM Europe 2014 and came to the conclusion that we might as well offer the feature behind an -f flag.<br>
<br>
This should satisfy user requests for C++11-style attributes in C11 without prejudicing any standards process. Thanks to the many detailed use-cases people sent in that have made me more comfortable picking this up again.<br>
</blockquote><div><br></div><div>Are these use-cases visible anywhere?</div><div> </div><blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex">
<br>
So, I've got a slightly improved version of the patch and will aim to rebase and post it to the list for review in the coming weeks.<br>
<br>
All we need now is great name for the -f flag ;-)<br>
<br>
Alp.<br>
<br>
<br>
On 15/01/2014 20:44, Alp Toker wrote:<br>
<blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex">
<br>
On 15/01/2014 20:29, Richard Smith wrote:<br>
<blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex">
On Wed Jan 15 2014 at 3:42:08 AM, Alp Toker <<a href="mailto:alp@nuanti.com" target="_blank">alp@nuanti.com</a> <mailto:<a href="mailto:alp@nuanti.com" target="_blank">alp@nuanti.com</a>>> wrote:<br>
<br>
<br>
    On 15/01/2014 06:04, Nico Weber wrote:<br>
    > Does gcc allow this for C? Is C planning on standardizing this?<br>
<br>
    The impression I get is that everybody's doing it but nobody's talking<br>
    about it. Yet.<br>
<br>
<br>
Weird. The impression I get is that nobody is doing it (at least, not publically).<br>
</blockquote>
<br>
People said they were patching internally to use new security and optimization attributes, and presumably there are others ("nobody's talking about it"). Seems a reasonable use case.<br>
<br>
<blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex">
<br>
What if a future revision of a standard we care about (maybe C, OpenMP, OpenCL, CUDA, ...) standardizes a *different* meaning for square brackets? Code that used our extension would be in trouble.<br>
</blockquote>
<br>
This is a great reason to hold back from switching it on globally.<br>
<br>
If we don't have "nudge" power in getting this as a de-facto C1y feature it becomes less interesting.<br>
<br>
<blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex">
<br>
This isn't even purely theoretical -- Objective-C does this, and it is essentially only by luck that it's possible to disambiguate this fully. As another example, if C17 took C++'s lambdas but not its attributes, we'd run into some amount of trouble with expressions like<br>

<br>
 int x[ [] { ... } () ];<br>
<br>
(which is an ill-formed attribute under the C++11 rules).<br>
</blockquote>
<br>
It'd be far from the worst disambiguation we have in-tree.<br>
<br>
Objective-C disambiguation is working fine with the C11 extension enabled for what it's worth.<br>
<br>
I'm withdrawing the patch, there are probably more useful things to be working on.<br>
<br>
Tentatively setting a date to revisit this in a years time or after gcc implements, whichever comes first, when there might be a clearer way forward.<br>
<br>
Alp.<br>
<br>
<br><span class="HOEnZb"><font color="#888888">
</font></span></blockquote><span class="HOEnZb"><font color="#888888">
<br>
-- <br>
<a href="http://www.nuanti.com" target="_blank">http://www.nuanti.com</a><br>
the browser experts<br>
<br>
</font></span></blockquote></div><br></div></div>