aboutsummaryrefslogtreecommitdiff
path: root/gcc/tree.c
diff options
context:
space:
mode:
authorPer Bothner <per@bothner.com>2004-07-14 17:02:30 -0700
committerPer Bothner <bothner@gcc.gnu.org>2004-07-14 17:02:30 -0700
commitaa3c6dc1604edf2119da7cf6d39c6afab3a676d7 (patch)
tree590981ecbc489c808f0c696cd08606defbd93ffa /gcc/tree.c
parent368b7a304e674df0e140b6dc164e670650c56486 (diff)
downloadgcc-aa3c6dc1604edf2119da7cf6d39c6afab3a676d7.zip
gcc-aa3c6dc1604edf2119da7cf6d39c6afab3a676d7.tar.gz
gcc-aa3c6dc1604edf2119da7cf6d39c6afab3a676d7.tar.bz2
input.h: If USE_MAPPED_LOCATION...
* input.h: If USE_MAPPED_LOCATION, define separate expanded_location structure with extra column field. * tree.c (expand_location): Also fill in column field. * gengtype-lex.l: Ignore expanded_location typedef, sinze gengtype gets confused by the two conditionally-compiled definitions. From-SVN: r84721
Diffstat (limited to 'gcc/tree.c')
-rw-r--r--gcc/tree.c3
1 files changed, 2 insertions, 1 deletions
diff --git a/gcc/tree.c b/gcc/tree.c
index 09a96330..8066cd1 100644
--- a/gcc/tree.c
+++ b/gcc/tree.c
@@ -2760,12 +2760,13 @@ expanded_location
expand_location (source_location loc)
{
expanded_location xloc;
- if (loc == 0) { xloc.file = NULL; xloc.line = 0; }
+ if (loc == 0) { xloc.file = NULL; xloc.line = 0; xloc.column = 0; }
else
{
const struct line_map *map = linemap_lookup (&line_table, loc);
xloc.file = map->to_file;
xloc.line = SOURCE_LINE (map, loc);
+ xloc.column = SOURCE_COLUMN (map, loc);
};
return xloc;
}