[cfe-commits] r80289 - /cfe/trunk/lib/Frontend/InitPreprocessor.cpp
Eli Friedman
eli.friedman at gmail.com
Thu Aug 27 15:01:41 PDT 2009
Author: efriedma
Date: Thu Aug 27 17:01:41 2009
New Revision: 80289
URL: http://llvm.org/viewvc/llvm-project?rev=80289&view=rev
Log:
Define _GNU_SOURCE in C++ mode so that clang works with GNU libstdc++.
Modified:
cfe/trunk/lib/Frontend/InitPreprocessor.cpp
Modified: cfe/trunk/lib/Frontend/InitPreprocessor.cpp
URL: http://llvm.org/viewvc/llvm-project/cfe/trunk/lib/Frontend/InitPreprocessor.cpp?rev=80289&r1=80288&r2=80289&view=diff
==============================================================================
--- cfe/trunk/lib/Frontend/InitPreprocessor.cpp (original)
+++ cfe/trunk/lib/Frontend/InitPreprocessor.cpp Thu Aug 27 17:01:41 2009
@@ -313,6 +313,8 @@
// C++ translation unit.
DefineBuiltinMacro(Buf, "__cplusplus=199711L");
DefineBuiltinMacro(Buf, "__private_extern__=extern");
+ // Ugly hack to work with GNU libstdc++.
+ DefineBuiltinMacro(Buf, "_GNU_SOURCE=1");
}
// Filter out some microsoft extensions when trying to parse in ms-compat
More information about the cfe-commits
mailing list