[PATCH] Allow _MSC_EXTENSIONS macro on non-Windows targets

David Majnemer david.majnemer at gmail.com
Mon Mar 10 18:05:48 PDT 2014


  Personally, I think this is a dangerous idea.

  [[ http://msdn.microsoft.com/en-us/library/34h23df8.aspx#sectionToggle0 | This page ]] lists some of the features that code can expect to see when `_MSC_EXTENSIONS` is enabled.

  Most notably, "Out of Class Definition of static const Integral (or enum) Members" is permitted which our `-fms-extensions` should **not** enable.

  [[ http://stackoverflow.com/questions/18771299/does-msvc-mishandle-the-linkage-of-class-scoped-statics-with-integral-constant-i | This misfeature comes up a lot ]] and `_MSC_EXTENSIONS` is often how people check for it.

http://llvm-reviews.chandlerc.com/D3034



More information about the cfe-commits mailing list