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 (bo

Re: [C++ Patch] PR 49152

2012-04-26 Thread Gabriel Dos Reis
On Thu, Apr 26, 2012 at 5:34 AM, Dodji Seketeli 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 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 ? G_(

Re: [C++ Patch] PR 49152

2012-04-16 Thread Gabriel Dos Reis
On Mon, Apr 16, 2012 at 8:31 AM, Paolo Carlini wrote: > Hi, > >> On Mon, Apr 16, 2012 at 12:42 AM, Marc Glisse >>  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

Re: [C++ Patch] PR 49152

2012-04-16 Thread Paolo Carlini
Hi, On Mon, Apr 16, 2012 at 12:42 AM, Marc Glisse 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 and the type (as sug

Re: [C++ Patch] PR 49152

2012-04-16 Thread Gabriel Dos Reis
On Mon, Apr 16, 2012 at 12:42 AM, Marc Glisse 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 and the type

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 loo

Re: [C++ Patch] PR 49152

2012-04-15 Thread Gabriel Dos Reis
On Sun, Apr 15, 2012 at 8:54 PM, Paolo Carlini wrote: > .. 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 se

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 toda

Re: [C++ Patch] PR 49152

2012-03-22 Thread Gabriel Dos Reis
On Thu, Mar 22, 2012 at 11:13 AM, Marc Glisse 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 cases.) What is at

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 Carlini wrote: Hi, this diagnostic issue is about not even trying to print expressions in error messages involving operators, and print operand types instead

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 Carlini 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;

Re: [C++ Patch] PR 49152

2012-03-21 Thread Gabriel Dos Reis
On Wed, Mar 21, 2012 at 7:22 PM, Paolo Carlini 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 []) { x [01] = 0; }

[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 + 4