diff options
-rw-r--r-- | gcc/diagnostic-spec.c | 5 | ||||
-rw-r--r-- | gcc/warning-control.cc | 3 |
2 files changed, 6 insertions, 2 deletions
diff --git a/gcc/diagnostic-spec.c b/gcc/diagnostic-spec.c index a8af229..4341ccf 100644 --- a/gcc/diagnostic-spec.c +++ b/gcc/diagnostic-spec.c @@ -195,7 +195,10 @@ copy_warning (location_t to, location_t from) else { if (from_spec) - nowarn_map->put (to, *from_spec); + { + nowarn_spec_t tem = *from_spec; + nowarn_map->put (to, tem); + } else nowarn_map->remove (to); } diff --git a/gcc/warning-control.cc b/gcc/warning-control.cc index f9808bf..fa39eca 100644 --- a/gcc/warning-control.cc +++ b/gcc/warning-control.cc @@ -206,7 +206,8 @@ void copy_warning (ToType to, FromType from) gcc_assert (supp); gcc_checking_assert (nowarn_map); - nowarn_map->put (to_loc, *from_spec); + nowarn_spec_t tem = *from_spec; + nowarn_map->put (to_loc, tem); } else { |