This is the mail archive of the mailing list for the GCC project.

Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]
Other format: [Raw text]

Fix PR preprocessor/4890

Thanks to Christian Ehrhardt for investigating this.  He noticed it
was not a C compiler issue, I noticed his message, and it was fairly
easy to locate and fix.

The bug is in that POS called tradcpp0.  I'm still rejoicing I put it
out of its misery in 3.3.  3.3 doesn't have this bug in its integrated
traditional preprocessor.

Mark, can I apply this to 3.2?  It's truly harmless, but is a 2.95


	* tradcpp.c (output_line_command): When leaving a file,
	system_include_depth has not yet been decremented.

Index: tradcpp.c
RCS file: /cvs/gcc/gcc/gcc/Attic/tradcpp.c,v
retrieving revision
diff -u -p -r1.47.2.2 tradcpp.c
--- tradcpp.c	22 May 2002 05:58:48 -0000
+++ tradcpp.c	8 Nov 2002 23:06:11 -0000
@@ -4104,7 +4104,7 @@ output_line_command (ip, op, conditional
   sprintf (line_cmd_buf, "# %d \"%s\"", ip->lineno, ip->fname);
   if (file_change != same_file)
     strcat (line_cmd_buf, file_change == enter_file ? " 1" : " 2");
-  if (system_include_depth > 0)
+  if (system_include_depth > (file_change == leave_file))
     strcat (line_cmd_buf, " 3");
   len = strlen (line_cmd_buf);
   line_cmd_buf[len++] = '\n';

Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]