I did a bit of netsearching and I think I see the problem, although I don't 
have a good solution. It is a result of optimization in the call sequence in 
test_append that calls str.append(value,len) which calls reserve(length() + 
count). length() is inlined to a reference to n so the argument is treated as 
"n+count". This yields, in the reserve method at the bad line

  if (n+count <= n)

which leads to the warning/error you see. I don't see how to disable the error, 
though. 

Tuesday, July 10, 2012, 2:48:07 PM, you wrote:

> On 10/07/2012, at 11:16 AM, James Peach <jpe...@apache.org> wrote:

>> Hi all,

>> So it seems that I have still broken the Fedora buildbot, 
>> http://ci.apache.org/builders/tserver-fedora-trunk/builds/1168:

>>  CXX    test_Vec.o

>> cc1plus: warnings being treated as errors
>> Vec.h: In function ‘int main(int, char**)’:
>> Vec.h:616: error: assuming signed overflow does not occur when assuming that 
>> (X + c) < X is always false
>> Vec.h:616: error: assuming signed overflow does not occur when assuming that 
>> (X + c) < X is always false

>> The error is apparantly here, which is a bit confusing:

>>   614  template <class C, class A, int S> inline void 
>>   615  Vec<C,A,S>::reserve(int x) {
>>   616    if (x <= n)
>>   617      return;

>> I tested that master builds fine on Fedora17 w/ gcc 4.7.0-5 and "make check" 
>> passes. Does anyone know what version of Fedora this buildbot is running?

> And everything's cool with Fedora 13 using gcc 4.4.5-2. Any clues gratefully 
> accepted ...

> J

Reply via email to