aboutsummaryrefslogtreecommitdiff
path: root/gcc/scan-decls.c
diff options
context:
space:
mode:
authorPer Bothner <per@bothner.com>2004-02-14 09:40:53 -0800
committerPer Bothner <bothner@gcc.gnu.org>2004-02-14 09:40:53 -0800
commitc7762b449dca23277872cd1365c84522e42caadc (patch)
treeeada207080ac63627087ff1b702269b3d8acb613 /gcc/scan-decls.c
parentcb7c0b5a3ebf751bae0be29a1cf3fff974fd1728 (diff)
downloadgcc-c7762b449dca23277872cd1365c84522e42caadc.zip
gcc-c7762b449dca23277872cd1365c84522e42caadc.tar.gz
gcc-c7762b449dca23277872cd1365c84522e42caadc.tar.bz2
fix-header.c (line_table): Move local variable in main to global.
* fix-header.c (line_table): Move local variable in main to global. * scan.h (line_table): Use it. * scan-decls.c (scan_decls): Need to call linemap_lookup on token's line (recently renamed to src_loc) before calling recognized_function. From-SVN: r77808
Diffstat (limited to 'gcc/scan-decls.c')
-rw-r--r--gcc/scan-decls.c6
1 files changed, 5 insertions, 1 deletions
diff --git a/gcc/scan-decls.c b/gcc/scan-decls.c
index ebd69cb..70b95bf 100644
--- a/gcc/scan-decls.c
+++ b/gcc/scan-decls.c
@@ -165,6 +165,8 @@ scan_decls (cpp_reader *pfile, int argc ATTRIBUTE_UNUSED,
{
int nesting = 1;
int have_arg_list = 0;
+ const struct line_map *map;
+ unsigned int line;
for (;;)
{
token = get_a_token (pfile);
@@ -182,7 +184,9 @@ scan_decls (cpp_reader *pfile, int argc ATTRIBUTE_UNUSED,
|| token->type == CPP_ELLIPSIS)
have_arg_list = 1;
}
- recognized_function (&prev_id, token->line,
+ map = linemap_lookup (&line_table, token->src_loc);
+ line = SOURCE_LINE (map, token->src_loc);
+ recognized_function (&prev_id, line,
(saw_inline ? 'I'
: in_extern_C_brace || current_extern_C
? 'F' : 'f'), have_arg_list);