This is the mail archive of the
gcc-patches@gcc.gnu.org
mailing list for the GCC project.
[PATCH] Honor NO_IMPLICIT_EXTERN_C in cpp output
- To: gcc-patches at gcc dot gnu dot org
- Subject: [PATCH] Honor NO_IMPLICIT_EXTERN_C in cpp output
- From: Jakub Jelinek <jakub at redhat dot com>
- Date: Fri, 2 Feb 2001 15:07:43 +0100
- Reply-To: Jakub Jelinek <jakub at redhat dot com>
Hi!
IMHO NO_IMPLICIT_EXTERN_C describes the state of system headers on a
particular platform and thus if there should be no implicit extern "C" on a
platform, then #line commands with 4 at the end should not make it into
preprocessed output no matter whether compiler considers those 4's or not
later on.
2001-02-02 Jakub Jelinek <jakub@redhat.com>
* cppinit.c (append_include_chain): Honour NO_IMPLICIT_EXTERN_C.
--- gcc/cppinit.c.jj Tue Jan 23 20:41:52 2001
+++ gcc/cppinit.c Fri Feb 2 15:56:15 2001
@@ -237,7 +237,11 @@ append_include_chain (pfile, dir, path,
new->ino = st.st_ino;
new->dev = st.st_dev;
if (path == SYSTEM)
+#ifdef NO_IMPLICIT_EXTERN_C
+ new->sysp = 1;
+#else
new->sysp = cxx_aware ? 1 : 2;
+#endif
else
new->sysp = 0;
new->name_map = NULL;
Jakub