X-Git-Url: http://git.sourceforge.jp/view?a=blobdiff_plain;f=libcpp%2Fline-map.c;h=a82c4286f07ba2d48bde4b2d5a9e7c4008651a24;hb=a784610abfc53b50d5d4a4e5f2d46070d2583ee7;hp=1c82902158a3c4c718c79f95326c155918476bc2;hpb=102a730640e59ff7e9703b2a25ee4a1f7643bfd1;p=pf3gnuchains%2Fgcc-fork.git
diff --git a/libcpp/line-map.c b/libcpp/line-map.c
index 1c82902158a..a82c4286f07 100644
--- a/libcpp/line-map.c
+++ b/libcpp/line-map.c
@@ -4,7 +4,7 @@
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
-Free Software Foundation; either version 2, or (at your option) any
+Free Software Foundation; either version 3, or (at your option) any
later version.
This program is distributed in the hope that it will be useful,
@@ -13,8 +13,8 @@ MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
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, 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA.
+along with this program; see the file COPYING3. If not see
+.
In other words, you are welcome to use, share and improve this program.
You are forbidden to forbid anyone else to use, share and improve
@@ -38,8 +38,8 @@ linemap_init (struct line_maps *set)
set->trace_includes = false;
set->depth = 0;
set->cache = 0;
- set->highest_location = 0;
- set->highest_line = 0;
+ set->highest_location = RESERVED_LOCATION_COUNT - 1;
+ set->highest_line = RESERVED_LOCATION_COUNT - 1;
set->max_column_hint = 0;
set->reallocator = 0;
}
@@ -109,9 +109,12 @@ linemap_add (struct line_maps *set, enum lc_reason reason,
map = &set->maps[set->used];
- if (to_file && *to_file == '\0')
+ if (to_file && *to_file == '\0' && reason != LC_RENAME_VERBATIM)
to_file = "";
+ if (reason == LC_RENAME_VERBATIM)
+ reason = LC_RENAME;
+
/* If we don't keep our line maps consistent, we can easily
segfault. Don't rely on the client to do it for us. */
if (set->depth == 0)