Re: [C++ Patch] PR 49152

2012-04-26 Thread Dodji Seketeli
Hello all, and sorry for getting into this a bit late. I have a question concerning this patch: +++ cp/call.c (working copy) [...] +static const char * +op_error_string (const char *err_msg, int ntypes, bool match) +{ + const char *msg; + + const char *msgt = concat (match ?

Re: [C++ Patch] PR 49152

2012-04-26 Thread Gabriel Dos Reis
On Thu, Apr 26, 2012 at 5:34 AM, Dodji Seketeli do...@seketeli.org wrote: Hello all, and sorry for getting into this a bit late.  I have a question concerning this patch: +++ cp/call.c (working copy) [...] +static const char * +op_error_string (const char *err_msg, int ntypes, bool match)

Re: [C++ Patch] PR 49152

2012-04-26 Thread Paolo Carlini
Hi, On 04/26/2012 03:27 PM, Gabriel Dos Reis wrote: yes, it does. On the other hand, the program is going to exit soon... -- Gaby In any case, a bit of sloppiness on my part. Sorry about that. Now, all in all I don't have a strong opinion, but we may want to apply something like the below

Re: [C++ Patch] PR 49152

2012-04-16 Thread Gabriel Dos Reis
On Mon, Apr 16, 2012 at 12:42 AM, Marc Glisse marc.gli...@inria.fr wrote: On Sun, 15 Apr 2012, Gabriel Dos Reis wrote: a hybrid approach; I would suggest something like this: (a) if caret is in effect, then print the caret pointing to the symbol in question; otherwise (b) print the symbol

Re: [C++ Patch] PR 49152

2012-04-16 Thread Gabriel Dos Reis
On Mon, Apr 16, 2012 at 8:31 AM, Paolo Carlini paolo.carl...@oracle.com wrote: Hi, On Mon, Apr 16, 2012 at 12:42 AM, Marc Glissemarc.gli...@inria.fr  wrote: On Sun, 15 Apr 2012, Gabriel Dos Reis wrote: a hybrid approach; I would suggest something like this: (a) if caret is in effect, then

Re: [C++ Patch] PR 49152

2012-04-15 Thread Paolo Carlini
.. hi all, hi Gaby, a couple of days ago, Manuel suggested in the audit trail of the main caret diagnostics PR, that now that we actually have got a form of it, the kind of change I proposed to resolve PR 49152 may make much more sense. In any case, my original patch still regtests fine

Re: [C++ Patch] PR 49152

2012-04-15 Thread Marc Glisse
On Sun, 15 Apr 2012, Gabriel Dos Reis wrote: a hybrid approach; I would suggest something like this: (a) if caret is in effect, then print the caret pointing to the symbol in question; otherwise (b) print the symbol and the type (as suggested by Marc). I may have forgotten the details, but

Re: [C++ Patch] PR 49152

2012-03-22 Thread Paolo Carlini
Hi, On 03/22/2012 05:25 AM, Gabriel Dos Reis wrote: On Wed, Mar 21, 2012 at 7:22 PM, Paolo Carlinipaolo.carl...@oracle.com wrote: Hi, this diagnostic issue is about not even trying to print expressions in error messages involving operators, and print operand types instead. Just as an

Re: [C++ Patch] PR 49152

2012-03-22 Thread Marc Glisse
On Thu, 22 Mar 2012, Paolo Carlini wrote: Hi, On 03/22/2012 05:25 AM, Gabriel Dos Reis wrote: On Wed, Mar 21, 2012 at 7:22 PM, Paolo Carlinipaolo.carl...@oracle.com wrote: Hi, this diagnostic issue is about not even trying to print expressions in error messages involving operators, and

Re: [C++ Patch] PR 49152

2012-03-22 Thread Gabriel Dos Reis
On Thu, Mar 22, 2012 at 11:13 AM, Marc Glisse marc.gli...@inria.fr wrote: I haven't followed the whole diagnostic discussion, but what about printing both the reconstructed expression and the types? Printing both isn't really the issue -- and we probably should. (And I thought we did in some

[C++ Patch] PR 49152

2012-03-21 Thread Paolo Carlini
Hi, this diagnostic issue is about not even trying to print expressions in error messages involving operators, and print operand types instead. Just as an example, for: struct X { int x; }; void trigger (X x []) { x [01] = 0; } we currently print: error: no match for ‘operator=’ in ‘*(x +

Re: [C++ Patch] PR 49152

2012-03-21 Thread Gabriel Dos Reis
On Wed, Mar 21, 2012 at 7:22 PM, Paolo Carlini paolo.carl...@oracle.com wrote: Hi, this diagnostic issue is about not even trying to print expressions in error messages involving operators, and print operand types instead. Just as an example, for: struct X { int x; }; void trigger (X x [])