aboutsummaryrefslogtreecommitdiff
path: root/libcpp/line-map.c
diff options
context:
space:
mode:
authorRichard Biener <rguenther@suse.de>2018-02-16 12:02:34 +0000
committerRichard Biener <rguenth@gcc.gnu.org>2018-02-16 12:02:34 +0000
commitfe74f9b4ed572a3bb2f8a110ea178578df8e0563 (patch)
treef83cb47e62d224c62b42c71358c21782e8925d88 /libcpp/line-map.c
parent5c8cebe7d6acb478309d6e03fd4df7e05d1b0f1e (diff)
downloadgcc-fe74f9b4ed572a3bb2f8a110ea178578df8e0563.zip
gcc-fe74f9b4ed572a3bb2f8a110ea178578df8e0563.tar.gz
gcc-fe74f9b4ed572a3bb2f8a110ea178578df8e0563.tar.bz2
re PR bootstrap/82939 (genmatch fills up terminal with endless printing of periods)
2018-02-16 Richard Biener <rguenther@suse.de> PR bootstrap/82939 * line-map.c (linemap_init): Avoid broken value-init when compiling with GCC 4.2. From-SVN: r257732
Diffstat (limited to 'libcpp/line-map.c')
-rw-r--r--libcpp/line-map.c5
1 files changed, 5 insertions, 0 deletions
diff --git a/libcpp/line-map.c b/libcpp/line-map.c
index 677acd6..a84084c 100644
--- a/libcpp/line-map.c
+++ b/libcpp/line-map.c
@@ -344,7 +344,12 @@ void
linemap_init (struct line_maps *set,
source_location builtin_location)
{
+#if __GNUC__ == 4 && __GNUC_MINOR__ == 2 && !defined (__clang__)
+ /* PR33916, needed to fix PR82939. */
+ memset (set, 0, sizeof (struct line_maps));
+#else
*set = line_maps ();
+#endif
set->highest_location = RESERVED_LOCATION_COUNT - 1;
set->highest_line = RESERVED_LOCATION_COUNT - 1;
set->location_adhoc_data_map.htab =