[haiku-development] Re: Haiku build error (imap_client.cpp / String.h)

  • From: Andreas Färber <andreas.faerber@xxxxxx>
  • To: haiku-development@xxxxxxxxxxxxx
  • Date: Wed, 11 Aug 2010 22:09:20 +0200

Am 08.08.2010 um 19:19 schrieb Ingo Weinhold:

On 2010-08-08 at 16:47:49 [+0200], Andreas Färber <andreas.faerber@xxxxxx > wrote:
I'm trying to update Haiku from r37391 to HEAD
(r37973), natively.

It fails as follows:

C++ /Source/haiku/generated-gcc4/objects/haiku/x86/release/add-ons/
mail_daemon/inbound_protocols/imap/ssl/imap_client.o
cc1plus: warnings being treated as errors
/Source/haiku/headers/os/support/String.h: In member function 'virtual
status_t IMAP4Client::CreateMailbox(const char*)':
/Source/haiku/headers/os/support/String.h:424: error: assuming signed
overflow does not occur when assuming that (X - c) > X is always false
/Source/haiku/headers/os/support/String.h: In member function 'void
IMAP4Client::InitializeMailboxes()':
/Source/haiku/headers/os/support/String.h:424: error: assuming signed
overflow does not occur when assuming that (X - c) > X is always false

http://dev.haiku-os.org/browser/haiku/trunk/headers/os/support/String.h?rev=37973#L424

Anyone any clue how to fix? Neither this line nor Length() does any
funky comparison, and both are of int32 type.

BString is not to blame. IIRC when GCC inlined functions it used to throw useless warnings of this kind. It used additional information available at the point of inlining and could consider inlined checks to be superfluous, which could lead to this kind of warning. Perhaps this problem is still with us with our current gcc.

I got around it by patching build/jam/BuildSetup. Will check if the error remains on HEAD in a clean build.

Andreas

Other related posts: