Re: [C++ Patch] One more DECL_SOURCE_LOCATION

2019-10-11 Thread Jason Merrill
On 10/11/19 6:58 AM, Paolo Carlini wrote: Hi, another straightforward DECL_SOURCE_LOCATION (TYPE_MAIN_DECL consistent with the one I used in build_anon_union_vars. Tested x86_64-linux. Thanks, Paolo. / OK. Jason

Re: [C++ Patch] One more DECL_SOURCE_LOCATION

2019-10-11 Thread Marek Polacek
On Fri, Oct 11, 2019 at 05:54:43PM +0200, Paolo Carlini wrote: > Hi, > > On 11/10/19 17:52, Jakub Jelinek wrote: > > On Fri, Oct 11, 2019 at 05:34:16PM +0200, Paolo Carlini wrote: > > > Hi again... > > > > > > On 11/10/19 17:30, Paolo Carlini wrote: > > > > Oh nice, I wasn't aware of that, to be

Re: [C++ Patch] One more DECL_SOURCE_LOCATION

2019-10-11 Thread Paolo Carlini
Hi, On 11/10/19 17:52, Jakub Jelinek wrote: On Fri, Oct 11, 2019 at 05:34:16PM +0200, Paolo Carlini wrote: Hi again... On 11/10/19 17:30, Paolo Carlini wrote: Oh nice, I wasn't aware of that, to be honest, probably we should audit the front-end for more such redundant uses. ... and I can con

Re: [C++ Patch] One more DECL_SOURCE_LOCATION

2019-10-11 Thread Jakub Jelinek
On Fri, Oct 11, 2019 at 05:34:16PM +0200, Paolo Carlini wrote: > Hi again... > > On 11/10/19 17:30, Paolo Carlini wrote: > > Oh nice, I wasn't aware of that, to be honest, probably we should audit > > the front-end for more such redundant uses. > > ... and I can confirm that we have *many*. If we

Re: [C++ Patch] One more DECL_SOURCE_LOCATION

2019-10-11 Thread Paolo Carlini
Hi again... On 11/10/19 17:30, Paolo Carlini wrote: Oh nice, I wasn't aware of that, to be honest, probably we should audit the front-end for more such redundant uses. ... and I can confirm that we have *many*. If we agree that removing all of them is the way to go I can do that in a follow u

Re: [C++ Patch] One more DECL_SOURCE_LOCATION

2019-10-11 Thread Paolo Carlini
Hi, On 11/10/19 17:23, Marek Polacek wrote: I mean the latter; pedwarn will check for diagnostic_report_warnings_p so the pedwarn will not trigger in a system header unless -Wsystem-headers even without that check. Oh nice, I wasn't aware of that, to be honest, probably we should audit the fr

Re: [C++ Patch] One more DECL_SOURCE_LOCATION

2019-10-11 Thread Marek Polacek
On Fri, Oct 11, 2019 at 05:14:33PM +0200, Paolo Carlini wrote: > Hi, > > On 11/10/19 15:37, Marek Polacek wrote: > > > > > Index: cp/decl.c > > > === > > > --- cp/decl.c (revision 276845) > > > +++ cp/decl.c (working copy) >

Re: [C++ Patch] One more DECL_SOURCE_LOCATION

2019-10-11 Thread Paolo Carlini
Hi, On 11/10/19 15:37, Marek Polacek wrote: Index: cp/decl.c === --- cp/decl.c (revision 276845) +++ cp/decl.c (working copy) @@ -4992,7 +4992,8 @@ check_tag_decl (cp_decl_specifier_seq *declspecs, if (TREE_CODE (de

Re: [C++ Patch] One more DECL_SOURCE_LOCATION

2019-10-11 Thread Marek Polacek
On Fri, Oct 11, 2019 at 12:58:41PM +0200, Paolo Carlini wrote: > Hi, > > another straightforward DECL_SOURCE_LOCATION (TYPE_MAIN_DECL consistent with > the one I used in build_anon_union_vars. Tested x86_64-linux. > > Thanks, Paolo. > > / > /cp > 2019-10-11 Paolo Carlini

[C++ Patch] One more DECL_SOURCE_LOCATION

2019-10-11 Thread Paolo Carlini
Hi, another straightforward DECL_SOURCE_LOCATION (TYPE_MAIN_DECL consistent with the one I used in build_anon_union_vars. Tested x86_64-linux. Thanks, Paolo. / /cp 2019-10-11 Paolo Carlini * decl.c (check_tag_decl): Use DECL_SOURCE_LOCATION. /testsuite 2019-10