Re: PR c++/54928 infinite ICE when reporting ICE on macro expansion

2012-10-24 Thread Jason Merrill
On 10/24/2012 01:54 PM, Manuel López-Ibáñez wrote: /* Add a note with text GMSGID and with LOCATION to the diagnostic CONTEXT. */ Sure. Actually, I don't know why I call it "attach". diagnostic_add_note() or diagnostic_print_note() seems clearer. What do you think? How about "append"? Jas

Re: PR c++/54928 infinite ICE when reporting ICE on macro expansion

2012-10-24 Thread Manuel López-Ibáñez
What about? /* Add a note with text GMSGID and with LOCATION to the diagnostic CONTEXT. */ Actually, I don't know why I call it "attach". diagnostic_add_note() or diagnostic_print_note() seems clearer. What do you think? Cheers, Manuel. On 24 October 2012 19:27, Jason Merrill wrote: > Agree

Re: PR c++/54928 infinite ICE when reporting ICE on macro expansion

2012-10-24 Thread Jason Merrill
Agreed. OK with the comment added. Jason

Re: PR c++/54928 infinite ICE when reporting ICE on macro expansion

2012-10-24 Thread Dodji Seketeli
I am not a maintainer so the below are just some casual comments of mine. I am deferring to the maintainers for a real review. Manuel López-Ibáñez writes: > gcc/ > * tree-diagnostic.c (maybe_unwind_expanded_macro_loc): > Use diagnostic_attach_note. > * diagnostic.c (diagnostic

Re: PR c++/54928 infinite ICE when reporting ICE on macro expansion

2012-10-23 Thread Manuel López-Ibáñez
On 18 October 2012 00:24, Gabriel Dos Reis wrote: > On Wed, Oct 17, 2012 at 6:26 AM, Manuel López-Ibáñez > wrote: >> On 17 October 2012 11:55, Dodji Seketeli wrote: >>> Hello Manuel, >>> >>> Let's CC Gaby on this one as well. >>> >>> Manuel López-Ibáñez writes: >>> The problem is that the

Re: PR c++/54928 infinite ICE when reporting ICE on macro expansion

2012-10-17 Thread Gabriel Dos Reis
On Wed, Oct 17, 2012 at 6:26 AM, Manuel López-Ibáñez wrote: > On 17 October 2012 11:55, Dodji Seketeli wrote: >> Hello Manuel, >> >> Let's CC Gaby on this one as well. >> >> Manuel López-Ibáñez writes: >> >>> The problem is that the macro unwinder code is changing the original >>> diagnostic typ

Re: PR c++/54928 infinite ICE when reporting ICE on macro expansion

2012-10-17 Thread Manuel López-Ibáñez
On 17 October 2012 11:55, Dodji Seketeli wrote: > Hello Manuel, > > Let's CC Gaby on this one as well. > > Manuel López-Ibáñez writes: > >> The problem is that the macro unwinder code is changing the original >> diagnostic type and not restoring it, so the code detecting that we >> ICE fails to a

Re: PR c++/54928 infinite ICE when reporting ICE on macro expansion

2012-10-17 Thread Dodji Seketeli
Hello Manuel, Let's CC Gaby on this one as well. Manuel López-Ibáñez writes: > The problem is that the macro unwinder code is changing the original > diagnostic type and not restoring it, so the code detecting that we > ICE fails to abort, which triggers another ICE, and so on. But there > is n

PR c++/54928 infinite ICE when reporting ICE on macro expansion

2012-10-16 Thread Manuel López-Ibáñez
The problem is that the macro unwinder code is changing the original diagnostic type and not restoring it, so the code detecting that we ICE fails to abort, which triggers another ICE, and so on. But there is no point in modifying the original diagnostic, we can simply create a temporary copy and u