From 469a31a98e086d65ed65fce224d88a45b9757828 Mon Sep 17 00:00:00 2001 From: Oleg Endo Date: Thu, 20 Jun 2013 19:22:02 +0000 Subject: [PATCH] system.h: Include as well as . * system.h: Include as well as . Co-Authored-By: Jason Merrill From-SVN: r200265 --- gcc/ChangeLog | 5 +++++ gcc/system.h | 8 ++++++++ 2 files changed, 13 insertions(+) diff --git a/gcc/ChangeLog b/gcc/ChangeLog index 40a36c0df5a..e3484bd5a4e 100644 --- a/gcc/ChangeLog +++ b/gcc/ChangeLog @@ -1,3 +1,8 @@ +2013-06-20 Oleg Endo + Jason Merrill + + * system.h: Include as well as . + 2013-06-20 Uros Bizjak PR target/57655 diff --git a/gcc/system.h b/gcc/system.h index 41cd565538a..f10ba4a0e81 100644 --- a/gcc/system.h +++ b/gcc/system.h @@ -226,6 +226,14 @@ extern int errno; # include #endif +/* When compiling C++ we need to include as well as so + that it is processed before we poison "malloc"; otherwise, if a source + file uses a standard library header that includes , we will get + an error about 'using std::malloc'. */ +#ifdef __cplusplus +#include +#endif + /* Undef vec_free from AIX stdlib.h header which conflicts with vec.h. */ #undef vec_free -- 2.30.2