summaryrefslogtreecommitdiff
path: root/gcc/c-cppbuiltin.c
diff options
context:
space:
mode:
authorPaolo Carlini <pcarlini@suse.de>2008-01-06 22:30:32 +0000
committerPaolo Carlini <paolo@gcc.gnu.org>2008-01-06 22:30:32 +0000
commitba551ec2775f53e7aab5eefd133e777d1edecd78 (patch)
tree49f6db21770fca4683407960abea244f2719be10 /gcc/c-cppbuiltin.c
parent5989df83be8402add1f7cad75ee98e7a8ac2dbda (diff)
downloadgcc-ba551ec2775f53e7aab5eefd133e777d1edecd78.tar.gz
re PR libstdc++/34680 (Unconditional use of dynamic_cast in locale_facets.tcc breaks compilation with -fno-rtti)
gcc/ 2008-01-06 Paolo Carlini <pcarlini@suse.de> PR libstdc++/34680 * c-cppbuiltin.c (c_cpp_builtins): Define __GXX_RTTI, if appropriate. * doc/cpp.texi ([Common Predefined Macros]): Document. gcc/testsuite/ 2008-01-06 Paolo Carlini <pcarlini@suse.de> PR libstdc++/34680 * g++.dg/rtti/predefined-rtti-macro-1.C: New. * g++.dg/rtti/predefined-rtti-macro-2.C: Likewise. From-SVN: r131366
Diffstat (limited to 'gcc/c-cppbuiltin.c')
-rw-r--r--gcc/c-cppbuiltin.c2
1 files changed, 2 insertions, 0 deletions
diff --git a/gcc/c-cppbuiltin.c b/gcc/c-cppbuiltin.c
index e201b058f5f..86c3f9cfff2 100644
--- a/gcc/c-cppbuiltin.c
+++ b/gcc/c-cppbuiltin.c
@@ -449,6 +449,8 @@ c_cpp_builtins (cpp_reader *pfile)
cpp_define (pfile, "__GXX_WEAK__=0");
if (warn_deprecated)
cpp_define (pfile, "__DEPRECATED");
+ if (flag_rtti)
+ cpp_define (pfile, "__GXX_RTTI");
if (cxx_dialect == cxx0x)
cpp_define (pfile, "__GXX_EXPERIMENTAL_CXX0X__");
}