This is the mail archive of the
gcc-patches@gcc.gnu.org
mailing list for the GCC project.
Patch for silly bug in cpplib
- To: egcs-patches at cygnus dot com
- Subject: Patch for silly bug in cpplib
- From: Zack Weinberg <zack at rabi dot columbia dot edu>
- Date: Fri, 09 Apr 1999 23:02:02 -0400
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);