Question about __builtin_add_overflow and friends

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

 



This link https://gcc.gnu.org/onlinedocs/gcc/Integer-Overflow-Builtins.html says "As the addition is performed in infinite signed precision, these built-in functions have fully defined behavior for all argument values. "

I'm curious if these types of builtins are well defined for things like the following:

int a, b;
a = 5;
b = 10;
__builtin_add_overflow(a,b,&a);

Notice the re-use of the variable a. I'm wondering if there is a sequencing issue and we need to use a third variable for the storage or if this is fine as well.


Thanks,
Scotty




[Index of Archives]     [Linux C Programming]     [Linux Kernel]     [eCos]     [Fedora Development]     [Fedora Announce]     [Autoconf]     [The DWARVES Debugging Tools]     [Yosemite Campsites]     [Yosemite News]     [Linux GCC]

  Powered by Linux