Re: [PATCH] PR71482: Add -Wglobal-constructors

2019-05-31 Thread Sean Gillespie
On Fri, May 31, 2019 at 9:30 AM Martin Sebor wrote: > > On 5/31/19 10:12 AM, Sean Gillespie wrote: > > On Thu, May 30, 2019 at 4:28 PM Martin Sebor wrote: > >> > >> On 5/28/19 3:30 PM, Sean Gillespie wrote: > >>> This adds a new warning, -Wglobal-constructors, that warns whenever a > >>> decl req

Re: [PATCH] PR71482: Add -Wglobal-constructors

2019-05-31 Thread Martin Sebor
On 5/31/19 10:12 AM, Sean Gillespie wrote: On Thu, May 30, 2019 at 4:28 PM Martin Sebor wrote: On 5/28/19 3:30 PM, Sean Gillespie wrote: This adds a new warning, -Wglobal-constructors, that warns whenever a decl requires a global constructor or destructor. This new warning fires whenever a th

Re: [PATCH] PR71482: Add -Wglobal-constructors

2019-05-31 Thread Marek Polacek
On Fri, May 31, 2019 at 06:25:03PM +0200, Jakub Jelinek wrote: > On Fri, May 31, 2019 at 12:16:58PM -0400, Marek Polacek wrote: > > > The warning is not meant to diagnose these. But I do agree that the > > > documentation for the new warning should be improved. > > > > I was partially wrong: if i

Re: [PATCH] PR71482: Add -Wglobal-constructors

2019-05-31 Thread Jakub Jelinek
On Fri, May 31, 2019 at 12:16:58PM -0400, Marek Polacek wrote: > > The warning is not meant to diagnose these. But I do agree that the > > documentation for the new warning should be improved. > > I was partially wrong: if i/j are at file scope, then the warning triggers. > But if i/j are in a fu

Re: [PATCH] PR71482: Add -Wglobal-constructors

2019-05-31 Thread Marek Polacek
On Fri, May 31, 2019 at 11:50:47AM -0400, Marek Polacek wrote: > On Thu, May 30, 2019 at 05:28:47PM -0600, Martin Sebor wrote: > > On 5/28/19 3:30 PM, Sean Gillespie wrote: > > > This adds a new warning, -Wglobal-constructors, that warns whenever a > > > decl requires a global constructor or destru

Re: [PATCH] PR71482: Add -Wglobal-constructors

2019-05-31 Thread Sean Gillespie
On Thu, May 30, 2019 at 4:28 PM Martin Sebor wrote: > > On 5/28/19 3:30 PM, Sean Gillespie wrote: > > This adds a new warning, -Wglobal-constructors, that warns whenever a > > decl requires a global constructor or destructor. This new warning fires > > whenever a thread_local or global variable is

Re: [PATCH] PR71482: Add -Wglobal-constructors

2019-05-31 Thread Marek Polacek
On Thu, May 30, 2019 at 05:28:47PM -0600, Martin Sebor wrote: > On 5/28/19 3:30 PM, Sean Gillespie wrote: > > This adds a new warning, -Wglobal-constructors, that warns whenever a > > decl requires a global constructor or destructor. This new warning fires > > whenever a thread_local or global vari

Re: [PATCH] PR71482: Add -Wglobal-constructors

2019-05-30 Thread Martin Sebor
On 5/28/19 3:30 PM, Sean Gillespie wrote: This adds a new warning, -Wglobal-constructors, that warns whenever a decl requires a global constructor or destructor. This new warning fires whenever a thread_local or global variable is declared whose type has a non-trivial constructor or destructor. W

Re: [PATCH] PR71482: Add -Wglobal-constructors

2019-05-30 Thread Sean Gillespie
Thank you for the review! On Thu, May 30, 2019 at 12:38 PM Marek Polacek wrote: > > Thanks for the patch! Do you have a copyright assignment on file? Unsure > if this patch is small enough not to need it. > Also unsure, though I assumed that this patch was small enough to not need one. I'll go

Re: [PATCH] PR71482: Add -Wglobal-constructors

2019-05-30 Thread Marek Polacek
On Tue, May 28, 2019 at 09:30:56PM +, Sean Gillespie wrote: > This adds a new warning, -Wglobal-constructors, that warns whenever a > decl requires a global constructor or destructor. This new warning fires > whenever a thread_local or global variable is declared whose type has a > non-trivial

[PATCH] PR71482: Add -Wglobal-constructors

2019-05-28 Thread Sean Gillespie
This adds a new warning, -Wglobal-constructors, that warns whenever a decl requires a global constructor or destructor. This new warning fires whenever a thread_local or global variable is declared whose type has a non-trivial constructor or destructor. When faced with both a constructor and a dest