Commit a5f87af7 by Martin Liska Committed by Martin Liska

Use 1UL constant in order to not overflow (PR c++/89383).

2019-02-18  Martin Liska  <mliska@suse.cz>

	PR c++/89383
	* line-map.c (linemap_line_start): Use 1UL in order
	to not overflow.

From-SVN: r268981
parent 469b4adb
2019-02-18 Martin Liska <mliska@suse.cz>
PR c++/89383
* line-map.c (linemap_line_start): Use 1UL in order
to not overflow.
2019-02-11 Martin Liska <mliska@suse.cz>
PR lto/88147
......
......@@ -745,7 +745,8 @@ linemap_line_start (struct line_maps *set, linenum_type to_line,
|| ( /* We can't reuse the map if the line offset is sufficiently
large to cause overflow when computing location_t values. */
(to_line - ORDINARY_MAP_STARTING_LINE_NUMBER (map))
>= (1U << (CHAR_BIT * sizeof (linenum_type) - column_bits)))
>= (((uint64_t) 1)
<< (CHAR_BIT * sizeof (linenum_type) - column_bits)))
|| range_bits < map->m_range_bits)
map = linemap_check_ordinary
(const_cast <line_map *>
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment