Follow @Openwall on Twitter for new release announcements and other news
[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Message-ID: <CACsECNf=5sVDEmUH8eSAxouJcpRC3fkXNgMtKML4SveVJqQ4jw@mail.gmail.com>
Date: Fri, 17 Jul 2015 21:38:55 +0200
From: Alex <alexinbeijing@...il.com>
To: musl@...ts.openwall.com
Subject: Re: Left-shift of negative number

> Effectively, the C standard at the place that you cite doesn't define
> a behavior for such shifts of negative values. But this doesn't mean
> that a particular implementation of a C compiler or the C library
> (here musl) can't define a behavior for that.

The problem is that some (hypothetical) standards-compliant C compiler
could define a behavior which isn't what musl intends. If such a
compiler ever came into existence and was used to build musl, the
resulting library could be subtly broken.

But if no such compiler is known to actually exist right now, does
anybody care? I don't know. Anyways, if the code can be adjusted to
avoid the dreaded "undefined behavior", without losing any
performance, it's probably better to do so.

AD

Powered by blists - more mailing lists

Confused about mailing lists and their use? Read about mailing lists on Wikipedia and check out these guidelines on proper formatting of your messages.