This is the mail archive of the gcc-patches@gcc.gnu.org mailing list for the GCC project.


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]

Re: [PATCH] Add ffs() to libiberty


In article <200107142258.SAA02250@greed.delorie.com> you write:
>
>> Yes it is portable.
>
>Only to two-s compliment machines.

No. On any machine.

Unsigned arithmetic in C is (by definition) two's complement.

It's only signed arithmetic that is implementation-defined for overflow.

			Linus


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]