On Sat, Oct 3, 2015 at 9:15 AM, Henrik Gramner <hen...@gramner.com> wrote:
> On Sat, Oct 3, 2015 at 2:58 PM, Ronald S. Bultje <rsbul...@gmail.com> wrote:
>> I wonder if some compilers will complain that this overflows (strictly
>> speaking it does) and that it should be -0x80000000 instead?
>
> -0x80000000 isn't a valid 32-bit integer in C. For this reason
> INT32_MIN is usually defined to something like (-0x7fffffff -1).

Indeed, see e.g:
"There are no negative integer literals. Expressions such as -1 apply
the unary minus operator to the value represented by the literal,
which may involve implicit type conversions." (from
http://en.cppreference.com/w/cpp/language/integer_literal).

Should we go ahead with the INT32_MIN then?

> _______________________________________________
> ffmpeg-devel mailing list
> ffmpeg-devel@ffmpeg.org
> http://ffmpeg.org/mailman/listinfo/ffmpeg-devel
_______________________________________________
ffmpeg-devel mailing list
ffmpeg-devel@ffmpeg.org
http://ffmpeg.org/mailman/listinfo/ffmpeg-devel

Reply via email to