[cfe-commits] Rép: [PATCH] _has_feature support for new C1X features.

Jean-Daniel Dupas devlists at shadowlab.org
Fri Apr 29 07:32:57 PDT 2011



Début du message réexpédié :

> De : Jean-Daniel Dupas <devlists at shadowlab.org>
> Date : 26 avril 2011 09:53:42 HAEC
> À : Peter Collingbourne <peter at pcc.me.uk>
> Cc : cfe-commits at cs.uiuc.edu
> Objet : Rép : [cfe-commits] [PATCH] _has_feature support for new C1X features.
> 
> 
> Le 26 avr. 2011 à 01:02, Peter Collingbourne a écrit :
> 
>> On Mon, Apr 25, 2011 at 09:15:09PM +0200, Jean-Daniel Dupas wrote:
>>> As clang start to implements C1X, it may be useful to extend __has_feature to support the new implemented features.
>>> 
>>> Here is a patch that add 'c_static_assert' and 'c_generic_selection', and a test case similar to the one used for c++0x.
>>> 
>>> This patch adds 'c_generic_selection', but I don't know the status of this feature. If it is not ready yet, this part should be commented.
>> 
>> Hi Jean-Daniel,
>> 
>> We already have __has_feature(generic_selections).
> 
> My bad, I missed it.
> I moved it next to "static_assert", so it would be easier to find what C1X extensions are already declared here.
> 
>> Prefixing C features with c_ is unprecedented (and it would of course
>> be a bad idea to rename the existing C features/extensions) so I think
>> that for the sake of consistency the C1X static assert feature should
>> just be called "static_assert".
> 
> Of course, it would definitively be better to keep it consistent.
> 
>> Also, C1X static assertions are supported as an extension in all
>> languages so the feature should not be predicated on the C1X language
>> option.
> 
> 
> Here is a patch that simply add "static_assert" and declare it enabled unconditionally.
> 


Is there someone to review (and apply) this minor change ? 

> 
> 


-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.llvm.org/pipermail/cfe-commits/attachments/20110429/723374fe/attachment.html>
-------------- next part --------------
A non-text attachment was scrubbed...
Name: c_features.patch
Type: application/octet-stream
Size: 947 bytes
Desc: not available
URL: <http://lists.llvm.org/pipermail/cfe-commits/attachments/20110429/723374fe/attachment.obj>
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.llvm.org/pipermail/cfe-commits/attachments/20110429/723374fe/attachment-0001.html>


More information about the cfe-commits mailing list