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