This is the mail archive of the
gcc@gcc.gnu.org
mailing list for the GCC project.
C++ headers vs safe-ctype.h
- From: FX <fxcoudert at gmail dot com>
- To: GCC Development <gcc at gcc dot gnu dot org>
- Cc: ilya dot enkovich at intel dot com
- Date: Fri, 7 Nov 2014 09:52:59 +0100
- Subject: C++ headers vs safe-ctype.h
- Authentication-results: sourceware.org; auth=none
Hi,
We are currently seeing two cases of C++-related bootstrap failures on Darwin, due to C++ header <string> being included after âsystem.hâ and âsafe-ctype.hâ: <string> headers, on Darwin, use ctype macros which GCC poisons through safe-ctype.h
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=63703
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=63750
This triggers in libcc1, and in the new ipa-chkp.c file. We can move the #include <string> line higher in the source files (as is already done, e.g., in go/go-system.h), but we probably need to think of a global solution, such as including basic C++ headers directly from the system.h header. I do not know enough about the state of our mixed C/C++ build to understand if that would work or create chaos, so Iâm dropping a line here so that âawareness of this general issue is raisedâ, as they say rather pompously :)
Cheers,
FX
PS: Ilya, I tried to CC you on the bugzilla PR 63750, but youâre not in the database.