Re: [C++ patch] for C++/52369

2014-04-06 Thread Mike Stump
On Apr 4, 2014, at 1:09 AM, Fabien Chêne wrote: > I was a bit too optimistic, old-deja needs to be adjusted. Thanks.

Re: [C++ patch] for C++/52369

2014-04-04 Thread Fabien Chêne
2014-04-02 22:39 GMT+02:00 Jason Merrill : > On 04/02/2014 04:21 PM, Fabien Chêne wrote: >> >> * cp/decl.c (duplicate_decls): Check for the return of >> permerror before emitting a note. > > > You don't need "cp/" within cp/ChangeLog. OK with that change. I was a bit too optimistic, old

Re: [C++ patch] for C++/52369

2014-04-02 Thread Jason Merrill
On 04/02/2014 04:21 PM, Fabien Chêne wrote: * cp/decl.c (duplicate_decls): Check for the return of permerror before emitting a note. You don't need "cp/" within cp/ChangeLog. OK with that change. Jason

Re: [C++ patch] for C++/52369

2014-04-02 Thread Fabien Chêne
2014-03-31 23:48 GMT+02:00 Jason Merrill : [...] >> if (permerror (input_location, >>"default argument given for parameter " >>"%d of %q#D", i, newdecl)) >> permerror (DECL_SOURCE_LOCATION (olddecl), >> "previous spe

Re: [C++ patch] for C++/52369

2014-03-31 Thread Jason Merrill
On 03/31/2014 04:27 PM, Fabien Chêne wrote: * cp/init.c (perform_member_init): Homogenize uninitialized diagnostics. OK. if (permerror (input_location, "default argument given for parameter " "%d of %q#D", i, newdecl)) perm

Re: [C++ patch] for C++/52369

2014-03-31 Thread Fabien Chêne
2014-03-28 17:59 GMT+01:00 Jason Merrill : [...] > The inform should only happen if permerror returns true (i.e. without > -fpermissive -w). OK with that change. I did a little tour around the permerror uses, and found that in decl.c: if (permerror (input_location, "defaul

Re: [C++ patch] for C++/52369

2014-03-31 Thread Fabien Chêne
2014-03-28 17:59 GMT+01:00 Jason Merrill : > On 03/27/2014 05:32 PM, Fabien Chêne wrote: >> >> + permerror (DECL_SOURCE_LOCATION (current_function_decl), >> +"uninitialized reference member in %q#T", type); >> + inform (DECL_SOURCE_LOCATION (member),

Re: [C++ patch] for C++/52369

2014-03-31 Thread Fabien Chêne
2014-03-28 20:27 GMT+01:00 Mike Stump : > Just a nit... > >> 2014-03-28 Fabien Chêne >> >>* cp/init.c (perform_member_init): homogeneize uninitialized >>diagnostics. > > Sentences begin with an upper case letter, and spelling... Homogenize.. I will fix that, thanks. -- Fabien

Re: [C++ patch] for C++/52369

2014-03-28 Thread Mike Stump
Just a nit… > 2014-03-28 Fabien Chêne > >* cp/init.c (perform_member_init): homogeneize uninitialized >diagnostics. Sentences begin with an upper case letter, and spelling… Homogenize..

Re: [C++ patch] for C++/52369

2014-03-28 Thread Jason Merrill
On 03/27/2014 05:32 PM, Fabien Chêne wrote: + permerror (DECL_SOURCE_LOCATION (current_function_decl), +"uninitialized reference member in %q#T", type); + inform (DECL_SOURCE_LOCATION (member), + "%q#D should be initialized", mem

Re: [C++ patch] for C++/52369

2014-03-27 Thread Fabien Chêne
Hi, As a followup, the following patch homogeneise some diagnostics that relate to uninitialized const or reference members. Tested x86_64 linux in progress, OK to commit for next stage 1 if that succeeds ? (or trunk otherwise, I dare to mention it). 2014-03-28 Fabien Chêne * cp/init.c (p

Re: [C++ patch] for C++/52369

2014-03-24 Thread Jason Merrill
OK, thanks. Jason

Re: [C++ patch] for C++/52369

2014-03-23 Thread Fabien Chêne
Hi, sorry for the delay, 2014-03-03 2:16 GMT+01:00 Jason Merrill : [...] > Yes, in C++11 the point of use is the source location of the constructor, > which is going to be different from where the constructor is called. I just > meant use the same wording. There we are, locating a point of use t

Re: [C++ patch] for C++/52369

2014-03-02 Thread Jason Merrill
On 03/02/2014 04:55 PM, Fabien Chêne wrote: Hmm, sorry to iterate on this rather trivial issue, but it seems difficult to mimic the c++98 diagnostic. Actually, the c++98 diagnosic raises an error at the point of use, mention the class implied, and add a note at the ref/const member uninitialized.

Re: [C++ patch] for C++/52369

2014-03-02 Thread Fabien Chêne
2014-02-28 22:52 GMT+01:00 Fabien Chêne : > 2014-02-28 22:27 GMT+01:00 Jason Merrill : >> Let's change the C++11 diagnostic to match the C++98 diagnostic. So, >> "uninitialized const member in %q#T" + "%qD should be initialized". > > OK. Hmm, sorry to iterate on this rather trivial issue, but it

Re: [C++ patch] for C++/52369

2014-02-28 Thread Jason Merrill
On 02/28/2014 05:04 PM, Fabien Chêne wrote: I guess my mistake comes from the fact that %q#D is not present in the c++98 diagnostic. Shall we homogeneise that as well ? In favor of %q#D ? OK. Jason

Re: [C++ patch] for C++/52369

2014-02-28 Thread Fabien Chêne
2014-02-28 22:52 GMT+01:00 Fabien Chêne : >>> Incidentally, while moving the diagnostic concerning the uninitialized >>> field from an error to an inform, I realized that the syntactic sugar >>> %q#D is no longer honored an is treated as %qD, is it expected ? >> >> >> No, how do you mean? > > I mus

Re: [C++ patch] for C++/52369

2014-02-28 Thread Fabien Chêne
2014-02-28 22:27 GMT+01:00 Jason Merrill : > Let's change the C++11 diagnostic to match the C++98 diagnostic. So, > "uninitialized const member in %q#T" + "%qD should be initialized". OK. >> Incidentally, while moving the diagnostic concerning the uninitialized >> field from an error to an infor

Re: [C++ patch] for C++/52369

2014-02-28 Thread Jason Merrill
On 02/28/2014 04:03 PM, Fabien Chêne wrote: The first two lines are fine in my opinion. The third line should actually be split into an error + an inform. By doing that, I think we also need to reformulate the error message like this: testsuite/g++.dg/init/pr44086.C:4:8: error: 'struct A' needs i

Re: [C++ patch] for C++/52369

2014-02-28 Thread Fabien Chêne
2014-02-27 19:25 GMT+01:00 Jason Merrill : > On 02/23/2014 02:36 PM, Fabien Chêne wrote: >> >> * cp/method.c (walk_field_subobs): improve the diagnostic >> locations for both REFERENCE_TYPEs and non-static const members. > > > It's important to have the error location be the place whe

Re: [C++ patch] for C++/52369

2014-02-27 Thread Jason Merrill
On 02/23/2014 02:36 PM, Fabien Chêne wrote: * cp/method.c (walk_field_subobs): improve the diagnostic locations for both REFERENCE_TYPEs and non-static const members. It's important to have the error location be the place where the actual problem is, namely the constructor defini

Re: [C++ patch] for C++/52369

2014-02-26 Thread Fabien Chêne
Ping (yeah boring to review!) 2014-02-23 20:36 GMT+01:00 Fabien Chêne : > Ahem, patch resubmitted with the testsuite correctly adjusted this > time. Tested x86_64 linux, still OK to commit ? > > 2014-02-23 Fabien Chene > PR c++/52369 > * cp/method.c (walk_field_subobs): improve

Re: [C++ patch] for C++/52369

2014-02-23 Thread Fabien Chêne
Ahem, patch resubmitted with the testsuite correctly adjusted this time. Tested x86_64 linux, still OK to commit ? 2014-02-23 Fabien Chene PR c++/52369 * cp/method.c (walk_field_subobs): improve the diagnostic locations for both REFERENCE_TYPEs and non-static const members.

Re: [C++ patch] for C++/52369

2014-02-06 Thread Jason Merrill
OK. Jason

[C++ patch] for C++/52369

2014-02-06 Thread Fabien Chêne
Hi, This bug seems already fixed on mainline. I have added two testcases, but as the C++11 one is not obvious to me, I guess this path does not qualify as obvious. Incidentally, while writing the C++11 testcase, I realized that the diagnostic was not emitted at the proper location and fixed it. O