Re: PATCH to shorten_compare -Wtype-limits handling

2015-12-09 Thread Manuel López-Ibáñez
On 20 November 2015 at 22:28, Jeff Law wrote: >>> That was the overall plan and he posted a patch for that. But that patch >>> didn't do the due diligence to verify that once the shortening code was >>> made >>> "pure" that we didn't regress on the quality of the code we

Re: PATCH to shorten_compare -Wtype-limits handling

2015-11-20 Thread Martin Sebor
Hmm, it looks like using expansion_point_if_in_system_header might avoid the first issue you mention. Thus. Great, thanks! (I'll have to remember the trick for my own use!) Martin

Re: PATCH to shorten_compare -Wtype-limits handling

2015-11-20 Thread Jason Merrill
On 11/19/2015 05:16 PM, Jason Merrill wrote: On 11/19/2015 02:44 PM, Martin Sebor wrote: On 11/18/2015 09:26 PM, Jason Merrill wrote: The rs6000 target was hitting a bootstrap failure due to -Werror=type-limits. Since warn_tautological_cmp and other warnings avoid warning if one of the

Re: PATCH to shorten_compare -Wtype-limits handling

2015-11-20 Thread Jeff Law
On 11/19/2015 12:02 PM, Manuel López-Ibáñez wrote: On 19 November 2015 at 17:54, Jeff Law wrote: But there were a couple of patches from you some time ago, for example: http://permalink.gmane.org/gmane.comp.gcc.patches/343476 What happened with those? On hold pending fixing

Re: PATCH to shorten_compare -Wtype-limits handling

2015-11-20 Thread Manuel López-Ibáñez
On 20 November 2015 at 17:42, Jeff Law wrote: > So we have to detangle the operand shortening from warning detection. Kai's > idea was to first make the shortening code "pure" in the sense that it would > have no side effects other than to generate the warnings. Canonicalization

Re: PATCH to shorten_compare -Wtype-limits handling

2015-11-20 Thread Manuel López-Ibáñez
On 20 November 2015 at 16:10, Martin Sebor wrote: >>> Hmm, it looks like using expansion_point_if_in_system_header might avoid >>> the first issue you mention. >> >> >> Thus. > > > Great, thanks! (I'll have to remember the trick for my own use!) I added this to

Re: PATCH to shorten_compare -Wtype-limits handling

2015-11-20 Thread Jeff Law
On 11/20/2015 11:04 AM, Manuel López-Ibáñez wrote: On 20 November 2015 at 17:42, Jeff Law wrote: So we have to detangle the operand shortening from warning detection. Kai's idea was to first make the shortening code "pure" in the sense that it would have no side effects other

Re: PATCH to shorten_compare -Wtype-limits handling

2015-11-19 Thread Martin Sebor
On 11/18/2015 09:26 PM, Jason Merrill wrote: The rs6000 target was hitting a bootstrap failure due to -Werror=type-limits. Since warn_tautological_cmp and other warnings avoid warning if one of the operands comes from a macro, I thought it would make sense to do that here as well. The also

Re: PATCH to shorten_compare -Wtype-limits handling

2015-11-19 Thread Manuel López-Ibáñez
On 19 November 2015 at 17:54, Jeff Law wrote: >> But there were a couple of patches from you some time ago, for >> example: http://permalink.gmane.org/gmane.comp.gcc.patches/343476 >> >> What happened with those? > > On hold pending fixing the type-limits warning placement.

Re: PATCH to shorten_compare -Wtype-limits handling

2015-11-19 Thread Jeff Law
On 11/19/2015 10:48 AM, Manuel López-Ibáñez wrote: On 19 November 2015 at 17:09, Jeff Law wrote: The even longer term direction for this code is to separate out the type-limits warning from the canonicalization and shortening. I've got a blob of code form Kai that goes in

Re: PATCH to shorten_compare -Wtype-limits handling

2015-11-19 Thread Jason Merrill
On 11/19/2015 02:44 PM, Martin Sebor wrote: On 11/18/2015 09:26 PM, Jason Merrill wrote: The rs6000 target was hitting a bootstrap failure due to -Werror=type-limits. Since warn_tautological_cmp and other warnings avoid warning if one of the operands comes from a macro, I thought it would make

Re: PATCH to shorten_compare -Wtype-limits handling

2015-11-19 Thread Jeff Law
On 11/18/2015 09:33 PM, David Edelsohn wrote: On Wed, Nov 18, 2015 at 11:26 PM, Jason Merrill wrote: The rs6000 target was hitting a bootstrap failure due to -Werror=type-limits. Since warn_tautological_cmp and other warnings avoid warning if one of the operands comes from a

Re: PATCH to shorten_compare -Wtype-limits handling

2015-11-19 Thread Manuel López-Ibáñez
On 19 November 2015 at 17:09, Jeff Law wrote: > The even longer term direction for this code is to separate out the > type-limits warning from the canonicalization and shortening. I've got a > blob of code form Kai that goes in that direction, but it needs more > engineering

Re: PATCH to shorten_compare -Wtype-limits handling

2015-11-18 Thread David Edelsohn
On Wed, Nov 18, 2015 at 11:26 PM, Jason Merrill wrote: > The rs6000 target was hitting a bootstrap failure due to > -Werror=type-limits. Since warn_tautological_cmp and other warnings avoid > warning if one of the operands comes from a macro, I thought it would make > sense to