diff options
author | Jason Merrill <jason@redhat.com> | 2018-05-17 19:28:34 -0400 |
---|---|---|
committer | Jason Merrill <jason@gcc.gnu.org> | 2018-05-17 19:28:34 -0400 |
commit | b2ff74575d7269d6f3a9a83b86e68d229cbc539f (patch) | |
tree | 67941a07b2fd39de7e20d799fcd8527e03749c2d /libcpp/line-map.c | |
parent | 7bbce9b50302959286381d9177818642bceaf301 (diff) | |
download | gcc-b2ff74575d7269d6f3a9a83b86e68d229cbc539f.zip gcc-b2ff74575d7269d6f3a9a83b86e68d229cbc539f.tar.gz gcc-b2ff74575d7269d6f3a9a83b86e68d229cbc539f.tar.bz2 |
line-map.c (linemap_init): Use placement new.
* line-map.c (linemap_init): Use placement new.
* system.h: #include <new>.
From-SVN: r260343
Diffstat (limited to 'libcpp/line-map.c')
-rw-r--r-- | libcpp/line-map.c | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/libcpp/line-map.c b/libcpp/line-map.c index a84084c..b2ebfeb 100644 --- a/libcpp/line-map.c +++ b/libcpp/line-map.c @@ -348,7 +348,7 @@ linemap_init (struct line_maps *set, /* PR33916, needed to fix PR82939. */ memset (set, 0, sizeof (struct line_maps)); #else - *set = line_maps (); + new (set) line_maps(); #endif set->highest_location = RESERVED_LOCATION_COUNT - 1; set->highest_line = RESERVED_LOCATION_COUNT - 1; |