Re: [C++ Patch/RFC] PR 54194

2012-10-08 Thread Jason Merrill
OK. Jason

Re: [C++ Patch/RFC] PR 54194

2012-10-08 Thread Paolo Carlini
Hi again, On 10/08/2012 11:44 PM, Jason Merrill wrote: On 10/08/2012 05:31 PM, Paolo Carlini wrote: So, there is a serious difficulty, I'm afraid: for the example at issue, EXPR_LOCATION (arg_left) is 0 not any meaningful value. And of course EXPR_LOC_OR_HERE would not be better in this case, w

Re: [C++ Patch/RFC] PR 54194

2012-10-08 Thread Paolo Carlini
On 10/08/2012 11:44 PM, Jason Merrill wrote: On 10/08/2012 05:31 PM, Paolo Carlini wrote: So, there is a serious difficulty, I'm afraid: for the example at issue, EXPR_LOCATION (arg_left) is 0 not any meaningful value. And of course EXPR_LOC_OR_HERE would not be better in this case, would give i

Re: [C++ Patch/RFC] PR 54194

2012-10-08 Thread Jason Merrill
On 10/08/2012 05:31 PM, Paolo Carlini wrote: So, there is a serious difficulty, I'm afraid: for the example at issue, EXPR_LOCATION (arg_left) is 0 not any meaningful value. And of course EXPR_LOC_OR_HERE would not be better in this case, would give input_location. So, what do you think? Shall we

Re: [C++ Patch/RFC] PR 54194

2012-10-08 Thread Paolo Carlini
On 10/08/2012 04:04 PM, Paolo Carlini wrote: On 10/08/2012 03:57 PM, Jason Merrill wrote: This is definitely an improvement, though for warnings about issues with the left or right argument, we could use the EXPR_LOCATION of the problematic argument rather than the location of the new operand.

Re: [C++ Patch/RFC] PR 54194

2012-10-08 Thread Paolo Carlini
On 10/08/2012 03:57 PM, Jason Merrill wrote: This is definitely an improvement, though for warnings about issues with the left or right argument, we could use the EXPR_LOCATION of the problematic argument rather than the location of the new operand. I agree. Let me see if I can figure out somet

Re: [C++ Patch/RFC] PR 54194

2012-10-08 Thread Jason Merrill
This is definitely an improvement, though for warnings about issues with the left or right argument, we could use the EXPR_LOCATION of the problematic argument rather than the location of the new operand. Jason

[C++ Patch/RFC] PR 54194

2012-10-08 Thread Paolo Carlini
Hi, in this PR submitter points out that in the -Wparentheses warning, for, eg, char in[4]={0}, out[6]; out[1] = in[1] & 0x0F | ((in[3] & 0x3C) << 2); warning: suggest parentheses around arithmetic in operand of ‘|’ [-Wparentheses] the caret points to end of the expression, ie the final clos