Hi, On 2018-03-17 14:20:26 -0400, Tom Lane wrote: > It might be worth studying the icc manual to see if it has an > equivalent of -fwrapv.
Yes. A *quick* look through https://software.intel.com/en-us/node/522795 unfortunately didn't show anything. > Although we can and probably should fix this case by changing the > code, I'm worried about what other bugs may exist only in icc builds. Yea, I know that I can produce a number of "bugs" today by removing -fwrapv for gcc, and found a few more by manual inspection. I'm sure icc can trigger at least some of them. > I know Andres would like to get rid of the need for -fwrapv but I > suspect that's not really going to happen soon. And definitely not in anything released or close to it. I do want to get rid of it because various compilers don't have comparable flags, and because it causes slowdowns. But I really would like to do it without running headfirst into a wall, and that'll mean going a bit slower. I think it'd be good practice to get rid of the known overflow hazards by using int.h, but I don't want to drop fwrapv immediately. Greetings, Andres Freund