Justin Bogner
2015-Feb-16 23:56 UTC
[LLVMdev] Do we still need LLVM_HAS_INITIALIZER_LISTS?
Currently, LLVM_HAS_INITIALIZER_LISTS is set based on __has_feature(cxx_generalized_initializers) && !defined(_MSC_VER) Based on the docs, we should be able to drop the _MSC_VER check now that we've moved to VS2013. Can somebody confirm that? The other problem is that GCC doesn't recognize __has_feature, so this is essentially only enabled for clang. If we're keeping this check it should really check the GCC version as well - they've had these for quite a while now.
David Majnemer
2015-Feb-17 03:30 UTC
[LLVMdev] Do we still need LLVM_HAS_INITIALIZER_LISTS?
On Mon, Feb 16, 2015 at 3:56 PM, Justin Bogner <mail at justinbogner.com> wrote:> Currently, LLVM_HAS_INITIALIZER_LISTS is set based on > > __has_feature(cxx_generalized_initializers) && !defined(_MSC_VER) > > Based on the docs, we should be able to drop the _MSC_VER check now that > we've moved to VS2013. Can somebody confirm that? > >MSDN claims that VS2013 supports braced initializer list syntax: https://msdn.microsoft.com/en-us/library/dn387583.aspx> The other problem is that GCC doesn't recognize __has_feature, so this > is essentially only enabled for clang. If we're keeping this check it > should really check the GCC version as well - they've had these for > quite a while now. > _______________________________________________ > LLVM Developers mailing list > LLVMdev at cs.uiuc.edu http://llvm.cs.uiuc.edu > http://lists.cs.uiuc.edu/mailman/listinfo/llvmdev >-------------- next part -------------- An HTML attachment was scrubbed... URL: <http://lists.llvm.org/pipermail/llvm-dev/attachments/20150216/6135e8b4/attachment.html>
Aaron Ballman
2015-Feb-17 15:39 UTC
[LLVMdev] Do we still need LLVM_HAS_INITIALIZER_LISTS?
On Mon, Feb 16, 2015 at 10:30 PM, David Majnemer <david.majnemer at gmail.com> wrote:> > > On Mon, Feb 16, 2015 at 3:56 PM, Justin Bogner <mail at justinbogner.com> > wrote: >> >> Currently, LLVM_HAS_INITIALIZER_LISTS is set based on >> >> __has_feature(cxx_generalized_initializers) && !defined(_MSC_VER) >> >> Based on the docs, we should be able to drop the _MSC_VER check now that >> we've moved to VS2013. Can somebody confirm that? >> > > MSDN claims that VS2013 supports braced initializer list syntax: > https://msdn.microsoft.com/en-us/library/dn387583.aspx > >> >> The other problem is that GCC doesn't recognize __has_feature, so this >> is essentially only enabled for clang. If we're keeping this check it >> should really check the GCC version as well - they've had these for >> quite a while now.I think we're safe to use it. I've made an experimental commit in r229502 to see if any of the bots complain, and will revert if they do. Otherwise, I think we're good to go. ~Aaron