[PATCH] D37436: Initial implementation of C attributes (WG14 N2137)

Aaron Ballman via Phabricator via cfe-commits cfe-commits at lists.llvm.org
Wed Sep 13 11:10:24 PDT 2017


aaron.ballman added a comment.

In https://reviews.llvm.org/D37436#869851, @hfinkel wrote:

> In https://reviews.llvm.org/D37436#869467, @aaron.ballman wrote:
>
> > In https://reviews.llvm.org/D37436#869462, @hfinkel wrote:
> >
> > > I think that I misunderstood your concern. Let me see if I can summarize your position: You believe that, when GCC implements this syntax in C, they will audit their attributes and not support all of their existing `gnu::` attributes in C. You only want us to support these when we know what that list will be (which we don't yet). Is that correct?
> >
> >
> > Yes, that is correct.
>
>
> Okay. A large fraction of the number of attributes we'll want to use are going to fall into this category (because Clang doesn't have its own attributes, but copied GCC's, for many things). I don't think we'll get good implementation feedback until we have this figured out. If we can't sync with GCC soon, I suggest just making a reasonable guess. My first choice would be to just allowing everything, and then we can see what people found to be useful and why. Our experience here can also provide feedback to GCC (and we can always update late if needed - it is still an experimental feature).


I think this direction is a reasonable one, but not for the initial syntax patch. I would prefer to be conservative and get the basic syntax in first. My plan is that once the syntax is available, I would start adding more attributes, starting with the ones proposed to WG14, followed by the existing C++ ones in the clang namespace. I think the gnu attributes would likely be immediately following the clang ones, so they're definitely a high priority for me to support.

Btw, because I wasn't explicit about this, we're in violent agreement that getting implementation experience about how well we can share attributes between C and C++ code bases is also an important question to answer.


https://reviews.llvm.org/D37436





More information about the cfe-commits mailing list