From: Oleg Endo Date: Thu, 20 Jun 2013 19:22:02 +0000 (+0000) Subject: system.h: Include as well as . X-Git-Tag: releases/gcc-4.9.0~5299 X-Git-Url: http://git.ipfire.org/gitweb.cgi?a=commitdiff_plain;h=469a31a98e086d65ed65fce224d88a45b9757828;p=thirdparty%2Fgcc.git system.h: Include as well as . * system.h: Include as well as . Co-Authored-By: Jason Merrill From-SVN: r200265 --- diff --git a/gcc/ChangeLog b/gcc/ChangeLog index 40a36c0df5a1..e3484bd5a4ee 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 41cd565538ae..f10ba4a0e817 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