libunwind-devel
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: [Libunwind-devel] [patch] Remove unnecessary calls to labs()


From: Roman Perepelitsa
Subject: Re: [Libunwind-devel] [patch] Remove unnecessary calls to labs()
Date: Wed, 29 Oct 2014 08:26:53 +0100

2014-10-29 7:58 GMT+01:00 Dmitri Shubin <address@hidden>:
Hi,

On Wed, Oct 22, 2014 at 10:23 PM, Paul Pluzhnikov <address@hidden> wrote:
For the curious:

  unsigned long u1 = ~0UL;
  unsigned long u2 = labs(u1);

  assert(u1 != u2);  // labs on unsigned *may* have an effect, despite
what Clang says.

Am I right that this is 'implementation-defined' behaviour?

Yes. Both in C and C++ this is implementation-defined.

Roman.

reply via email to

[Prev in Thread] Current Thread [Next in Thread]