summaryrefslogtreecommitdiffstats
path: root/contrib/gcc/scan-decls.c
diff options
context:
space:
mode:
authorkan <kan@FreeBSD.org>2007-05-19 01:19:51 +0000
committerkan <kan@FreeBSD.org>2007-05-19 01:19:51 +0000
commit1f9ea4d0a40cca64d60cf4dab152349da7b9dddf (patch)
tree0cb530c9c38af219e6dda2994c078b6b2b9ad853 /contrib/gcc/scan-decls.c
parent4895159b2b4f648051c1f139faa7b6dc50c2bfcb (diff)
downloadFreeBSD-src-1f9ea4d0a40cca64d60cf4dab152349da7b9dddf.zip
FreeBSD-src-1f9ea4d0a40cca64d60cf4dab152349da7b9dddf.tar.gz
GCC 4.2.0 release.
Diffstat (limited to 'contrib/gcc/scan-decls.c')
-rw-r--r--contrib/gcc/scan-decls.c12
1 files changed, 9 insertions, 3 deletions
diff --git a/contrib/gcc/scan-decls.c b/contrib/gcc/scan-decls.c
index ebd69cb..d7b592b 100644
--- a/contrib/gcc/scan-decls.c
+++ b/contrib/gcc/scan-decls.c
@@ -1,6 +1,6 @@
/* scan-decls.c - Extracts declarations from cpp output.
Copyright (C) 1993, 1995, 1997, 1998,
- 1999, 2000, 2003 Free Software Foundation, Inc.
+ 1999, 2000, 2003, 2004 Free Software Foundation, Inc.
This program is free software; you can redistribute it and/or modify it
under the terms of the GNU General Public License as published by the
@@ -14,7 +14,7 @@ GNU General Public License for more details.
You should have received a copy of the GNU General Public License
along with this program; if not, write to the Free Software
-Foundation, 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA.
+Foundation, 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA.
Written by Per Bothner <bothner@cygnus.com>, July 1993. */
@@ -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);
@@ -198,6 +202,8 @@ scan_decls (cpp_reader *pfile, int argc ATTRIBUTE_UNUSED,
parameter list */
while (token->type != CPP_SEMICOLON && token->type != CPP_EOF)
token = get_a_token (pfile);
+ if (token->type == CPP_EOF)
+ return 0;
goto new_statement;
}
break;
OpenPOWER on IntegriCloud