diff options
author | manu <manu@138bc75d-0d04-0410-961f-82ee72b054a4> | 2008-07-21 09:33:38 +0000 |
---|---|---|
committer | manu <manu@138bc75d-0d04-0410-961f-82ee72b054a4> | 2008-07-21 09:33:38 +0000 |
commit | 4999c35b921bb613553d9f875e8cee3b39c80cc3 (patch) | |
tree | 00b640cdfaf5963f35e76e06f15ad82396dda370 /libcpp/line-map.c | |
parent | 151c036b80e9c25fbb85399afd317282f15feb33 (diff) | |
download | gcc-4999c35b921bb613553d9f875e8cee3b39c80cc3.tar.gz |
2008-07-21 Manuel Lopez-Ibanez <manu@gcc.gnu.org>
* include/line-map.h (linenum_type): New typedef.
(struct line_map): Use it.
(SOURCE_LINE): Second arguments is a LOCATION not a LINE.
(SOURCE_COLUMN): Likewise.
* macro.c (_cpp_builtin_macro_text): Use linenum_type. Don't store
source_location values in a variable of type linenum_type.
* directives.c (struct if_stack): Use linenum_type.
(strtoul_for_line): Rename as strtolinenum.
(do_line): Use linenum_type.
(do_linemarker): Use linenum_type and strtolinenum.
(_cpp_do_file_change): Use linenum_t.
* line-map.c (linemap_add): Likewise.
(linemap_line_start): Likewise.
* traditional.c (struct fun_macro): 'line' is a source_location.
* errors.c (print_location): Use linenum_type.
* directives-only.c (_cpp_preprocess_dir_only): Likewise.
* internal.h (CPP_INCREMENT_LINE): Likewise.
* lex.c (_cpp_skip_block_comment): Use source_location.
git-svn-id: svn+ssh://gcc.gnu.org/svn/gcc/trunk@138026 138bc75d-0d04-0410-961f-82ee72b054a4
Diffstat (limited to 'libcpp/line-map.c')
-rw-r--r-- | libcpp/line-map.c | 6 |
1 files changed, 3 insertions, 3 deletions
diff --git a/libcpp/line-map.c b/libcpp/line-map.c index 2c6d2510e61..964a7cd9a77 100644 --- a/libcpp/line-map.c +++ b/libcpp/line-map.c @@ -85,7 +85,7 @@ linemap_free (struct line_maps *set) const struct line_map * linemap_add (struct line_maps *set, enum lc_reason reason, - unsigned int sysp, const char *to_file, unsigned int to_line) + unsigned int sysp, const char *to_file, linenum_type to_line) { struct line_map *map; source_location start_location = set->highest_location + 1; @@ -182,13 +182,13 @@ linemap_add (struct line_maps *set, enum lc_reason reason, } source_location -linemap_line_start (struct line_maps *set, unsigned int to_line, +linemap_line_start (struct line_maps *set, linenum_type to_line, unsigned int max_column_hint) { struct line_map *map = &set->maps[set->used - 1]; source_location highest = set->highest_location; source_location r; - unsigned int last_line = SOURCE_LINE (map, set->highest_line); + linenum_type last_line = SOURCE_LINE (map, set->highest_line); int line_delta = to_line - last_line; bool add_map = false; if (line_delta < 0 |