This is the mail archive of the mailing list for the binutils project.

Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]
Other format: [Raw text]

Re: [gold] Build regression on i386 host [Re: [patch 6/7] [gold] Add initial source code for dwp utility.]

On Thu, Oct 25, 2012 at 09:10:14AM +0200, Jan Kratochvil wrote:
> > +  if (p == this->str_offset_map_.end() || p->first > val)
> error: comparison between signed and unsigned integer expressions [-Werror=sign-compare]

On 32-bit hosts, p->first, a section_offset_type, is 32-bit signed.  I
think we are only interested in non-negative offsets, so maybe this:

Index: gold/
RCS file: /cvs/src/src/gold/,v
retrieving revision 1.1
diff -u -p -r1.1
--- gold/	24 Oct 2012 02:26:39 -0000	1.1
+++ gold/	25 Oct 2012 11:02:00 -0000
@@ -74,7 +74,7 @@ class Dwo_file
   // Types for mapping input string offsets to output string offsets.
-  typedef std::pair<section_offset_type, section_offset_type>
+  typedef std::pair<section_size_type, section_size_type>
   typedef std::vector<Str_offset_map_entry> Str_offset_map;

Alan Modra
Australia Development Lab, IBM

Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]