summaryrefslogtreecommitdiff
path: root/gcc/scan-decls.c
diff options
context:
space:
mode:
authorbothner <bothner@138bc75d-0d04-0410-961f-82ee72b054a4>2004-02-14 17:40:53 +0000
committerbothner <bothner@138bc75d-0d04-0410-961f-82ee72b054a4>2004-02-14 17:40:53 +0000
commitc513754a899164fdc32b6f3813bc6a379d5f6e95 (patch)
treeeada207080ac63627087ff1b702269b3d8acb613 /gcc/scan-decls.c
parent08c53a6e374a41439057485946be695f68e4b6d2 (diff)
downloadgcc-c513754a899164fdc32b6f3813bc6a379d5f6e95.tar.gz
* 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. git-svn-id: svn+ssh://gcc.gnu.org/svn/gcc/trunk@77808 138bc75d-0d04-0410-961f-82ee72b054a4
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 ebd69cb05c1..70b95bf50ae 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);