From: Mark Wielaard Date: Thu, 25 Nov 2010 13:02:44 +0000 (+0100) Subject: Don't call c++ constructors directly by name. X-Git-Url: http://git.ipfire.org/?a=commitdiff_plain;h=5c8b336aab5afeb59558560045bdae71f03dc677;p=thirdparty%2Felfutils.git Don't call c++ constructors directly by name. g++ 4.5 doesn't like to call constructors by name directly. http://www.open-std.org/jtc1/sc22/wg21/docs/cwg_defects.html#147 --- diff --git a/libdw/c++/dwarf b/libdw/c++/dwarf index 975c1545f..4ab57ce8f 100644 --- a/libdw/c++/dwarf +++ b/libdw/c++/dwarf @@ -1,5 +1,5 @@ /* -*- C++ -*- interfaces for libdw. - Copyright (C) 2009 Red Hat, Inc. + Copyright (C) 2009, 2010 Red Hat, Inc. This file is part of Red Hat elfutils. Red Hat elfutils is free software; you can redistribute it and/or modify @@ -2246,7 +2246,7 @@ namespace elfutils }; inline raw_compile_units_type raw_compile_units () const { - return raw_compile_units_type::raw_compile_units_type (*this); + return raw_compile_units_type (*this); } private: @@ -2295,7 +2295,7 @@ namespace elfutils }; inline class compile_units_type compile_units () const { - return compile_units_type::compile_units_type (raw_compile_units ()); + return compile_units_type (raw_compile_units ()); } private: @@ -2491,25 +2491,25 @@ namespace elfutils inline class dwarf::debug_info_entry::raw_children_type dwarf::debug_info_entry::raw_children () const { - return raw_children_type::raw_children_type (*this); + return raw_children_type (*this); } inline class dwarf::debug_info_entry::children_type dwarf::debug_info_entry::children () const { - return children_type::children_type (*this); + return children_type (*this); } inline class dwarf::debug_info_entry::raw_attributes_type dwarf::debug_info_entry::raw_attributes () const { - return raw_attributes_type::raw_attributes_type (*this); + return raw_attributes_type (*this); } inline class dwarf::debug_info_entry::attributes_type dwarf::debug_info_entry::attributes () const { - return attributes_type::attributes_type (raw_attributes ()); + return attributes_type (raw_attributes ()); } // Explicit specializations. diff --git a/libdw/c++/dwarf_output b/libdw/c++/dwarf_output index 53decf493..9e5c1f632 100644 --- a/libdw/c++/dwarf_output +++ b/libdw/c++/dwarf_output @@ -561,7 +561,7 @@ namespace elfutils inline dwarf_output (const input &dw, dwarf_output_collector &c) { copier maker (c); - _m_units.swap (compile_units_type::compile_units_type (dw.compile_units (), maker)); + _m_units.swap (compile_units_type (dw.compile_units (), maker)); } template diff --git a/libdw/c++/line_info.cc b/libdw/c++/line_info.cc index b913da626..83e625109 100644 --- a/libdw/c++/line_info.cc +++ b/libdw/c++/line_info.cc @@ -45,7 +45,7 @@ dwarf::attr_value::source_file () const default: throw std::runtime_error ("XXX not a file name"); } - return source_file::source_file (_m_attr); + return dwarf::source_file (_m_attr); } static bool