[cfe-dev] Adding a new pragma to Clang

Renato Golin renato.golin at linaro.org
Wed Jan 8 09:16:48 PST 2014


On 8 January 2014 16:55, Hal Finkel <hfinkel at anl.gov> wrote:

> I agree that adding attributes is much easier; and I'm fine with taking
> this approach. I think that, in general, we should work on an
> infrastructure that lets the pragma parsing build off of the attribute
> handing. I don't see any real reason to have separate code paths for the
> two (in those cases where they are doing similar things).
>

Agreed.


In the long run we should, however, definitely support a pragma syntax.
> That is the proper, standard, way of providing these kinds of extensions in
> pre-C++11 languages.
>

Agreed.


I'll add that, as I understand it, one of the original design motivations
> for C++11 attributes was so that extensions like OpenMP could be specified
> in terms of C++ attributes instead of or in addition to pragmas. I don't
> think the OpenMP ARB has yet acted on this, but I expect that as C++11
> support is specifically addressed in upcoming versions of the OpenMP
> specification, we might see movement in this direction.
>

This is interesting. We can add the attributes in "beta" stage, and change
to closer to whatever OMP comes up, just to make things easier to users.
Since this attribute is going to be only used by a handful of people for
now, mostly us and tests, I think it should be ok.

cheers,
--renato
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.llvm.org/pipermail/cfe-dev/attachments/20140108/8749d3d8/attachment.html>


More information about the cfe-dev mailing list