projects
/
gcc.git
/ commitdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
| commitdiff |
tree
raw
|
patch
| inline |
side by side
(parent:
058acef
)
Fix line number counting.
author
Per Bothner
<bothner@gcc.gnu.org>
Mon, 11 Apr 1994 21:26:48 +0000
(14:26 -0700)
committer
Per Bothner
<bothner@gcc.gnu.org>
Mon, 11 Apr 1994 21:26:48 +0000
(14:26 -0700)
From-SVN: r7036
gcc/scan.c
patch
|
blob
|
history
diff --git
a/gcc/scan.c
b/gcc/scan.c
index 17e9898497f155cbc5532da0c004267c68631926..b62899081916f57e02b35b2b532df494403b87c3 100644
(file)
--- a/
gcc/scan.c
+++ b/
gcc/scan.c
@@
-220,7
+220,7
@@
get_token (fp, s)
c = get_token (fp, s);
if (c == INT_TOKEN)
{
- source_lineno = atoi (s->base)
;
+ source_lineno = atoi (s->base)
- 1; /* '\n' will add 1 */
get_token (fp, &source_filename);
}
for (;;)
@@
-229,7
+229,11
@@
get_token (fp, s)
if (c == EOF)
return EOF;
if (c == '\n')
+ {
+ source_lineno++;
+ lineno++;
goto retry;
+ }
}
}
if (c == EOF)