bug-gnulib
[Top][All Lists]
Advanced

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

Re: checking against signed integer overflow


From: Paul Eggert
Subject: Re: checking against signed integer overflow
Date: Sat, 5 Dec 2020 12:16:11 -0800
User-agent: Mozilla/5.0 (X11; Linux x86_64; rv:78.0) Gecko/20100101 Thunderbird/78.5.0

On 12/5/20 8:43 AM, Jeffrey Walton wrote:
I also have some GCC inline assembly one-liners that I use on
occasion. The good thing about inline assembly is, ASM does not suffer
C's undefined behavior.

Although asms are occasionally used in Gnulib, they are a maintenance hassle and aren't needed for good performance in doing integer overflow checking. The Gnulib intprops module doesn't use asms and does not rely on undefined behavior, and I'd be surprised if it's significantly outperformed by the usual asms for this particular task.



reply via email to

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