[Top][All Lists]

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

Re: [PATCH] intprops: add WRAPV and const flavors for GCC 5

From: Paul Eggert
Subject: Re: [PATCH] intprops: add WRAPV and const flavors for GCC 5
Date: Fri, 18 Dec 2015 00:00:01 -0800
User-agent: Mozilla/5.0 (X11; Linux x86_64; rv:38.0) Gecko/20100101 Thunderbird/38.4.0

Pádraig Brady wrote:
The issue I have with the example is that INT_MULTIPLY_WRAPV()
takes 3 arguments, while only 2 are provided.

Ouch, right! I didn't see that. Fixed with the attached.

In case gcc decides to continue to warn in this case, I suppose we could avoid
the undefined code by promoting to a wider type and explicitly truncating
the result (though that might need __int128 if available for your new 64 bit 

I didn't want to go that route, due to the portability hassles of dealing with __int128 support. (Besides, if we wanted to deal with __int128, we'd want to deal with it as an operand type too, which means we'd need __int256.... :-)

Attachment: 0001-intprops-comment-fix.patch
Description: Text Data

reply via email to

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