This is the mail archive of the gcc-patches@gcc.gnu.org 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]

Patch for silly bug in cpplib



I've commited this under the obvious bug rule.  It makes __LINE__ work
inside a macro, e.g.

#define x() y(__LINE__)

zw

1999-04-09 23:01 -0400  Zack Weinberg  <zack@rabi.phys.columbia.edu>

	* cpphash.c (special_symbol): When expanding __LINE__, use the
	top file buffer, not the top buffer.

===================================================================
Index: cpphash.c
--- cpphash.c	1999/04/06 10:04:09	1.17
+++ cpphash.c	1999/04/10 03:00:35
@@ -991,7 +991,7 @@
     case T_SPECLINE:
       {
 	long line;
-	cpp_buf_line_and_col (CPP_BUFFER (pfile), &line, NULL);
+	cpp_buf_line_and_col (cpp_file_buffer (pfile), &line, NULL);
 
 	CPP_RESERVE (pfile, 10);
 	sprintf (CPP_PWRITTEN (pfile), "%ld", line);


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