This is the mail archive of the gcc@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]
Other format: [Raw text]

Re: some integer undefined behaviors in gcc


On 08/08/2010 07:13 AM, Florian Weimer wrote:
* Vincent Lefevre:

On 2010-08-07 13:38:05 +0200, Florian Weimer wrote:
* John Regehr:
[...]
Let me know if more detail is needed or if it would be better for me to
file all 71 bug reports.

I wonder if we should give up and make -fwrapv the default.

Do you really mean that all these integer overflows should behave like -fwrapv and none of them can hide a real bug?

There quite a few instances of the x & -x pattern, which would be fine with -fwrapv.

It's always valid if you know that x is not INT_MIN, which you do in many cases (for example if x is an offset).


Paolo


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