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

Jean-Daniel Dupas devlists at shadowlab.org
Sun May 1 23:30:38 PDT 2011


Le 1 mai 2011 à 20:44, Chris Lattner a écrit :

> 
> On Apr 30, 2011, at 2:08 PM, Peter Collingbourne wrote:
> 
>> 
>> __has_extension should be a superset of __has_feature, so it should
>> also include the C++ and C++0x features, as well as the Clang specific
>> extensions.  This can be done trivially by calling HasFeature from
>> HasExtension.
> 
> I agree.  We should also have a __has_feature(has_extension) of course, and the new goodness should be documented in the language extensions guide.
> 

Is this really needed ? We can already test for has_extension availability using ifdef.
#ifndef __has_extension         // Optional of course.
  #define __has_extension(x) 0  // Compatibility with non-clang compilers.
#endif

-- Jean-Daniel




-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.llvm.org/pipermail/cfe-commits/attachments/20110502/377a2f10/attachment.html>


More information about the cfe-commits mailing list