Re: [wwwdocs] Add a note about in-class initialization of static data member

2016-02-11 Thread Marek Polacek
On Thu, Feb 11, 2016 at 01:36:49PM -0700, Martin Sebor wrote: > >>The flexible array addition looks great to me. Thank you! > > > >Great. I'll commit the patch. > > Actually, there is one other thing that might be wort mentioning > about flexible array members. > > The type and mangling of flexi

Re: [wwwdocs] Add a note about in-class initialization of static data member

2016-02-11 Thread Martin Sebor
The flexible array addition looks great to me. Thank you! Great. I'll commit the patch. Actually, there is one other thing that might be wort mentioning about flexible array members. The type and mangling of flexible array members has changed. While in GCC 5 and prior the type of a flexible

Re: [wwwdocs] Add a note about in-class initialization of static data member

2016-02-11 Thread Marek Polacek
On Thu, Feb 11, 2016 at 11:45:37AM -0700, Martin Sebor wrote: > >> struct X { > >> const static double i = 3.14; > >> }; > >> > >> error: floating-point literal cannot appear in a constant-expression > >> const static double i = 3.14; > >>^~~~ > > > >Hm, in

Re: [wwwdocs] Add a note about in-class initialization of static data member

2016-02-11 Thread Martin Sebor
struct X { const static double i = 3.14; }; error: floating-point literal cannot appear in a constant-expression const static double i = 3.14; ^~~~ Hm, indeed; I hadn't notice that. Dunno if is a bug (clang++ accepts this with a warning). I've ad

Re: [wwwdocs] Add a note about in-class initialization of static data member

2016-02-11 Thread Marek Polacek
On Thu, Feb 11, 2016 at 10:09:19AM -0700, Martin Sebor wrote: > It''s interesting that when the example is modified to use a double > initializer it is rejected with a hard error even in C++ 03 mode > when -Wpedantic (but not -Werror) is used. That seems like a bug. > If it isn't, it might be wort

Re: [wwwdocs] Add a note about in-class initialization of static data member

2016-02-11 Thread Martin Sebor
On 02/11/2016 09:39 AM, Marek Polacek wrote: On Thu, Feb 11, 2016 at 03:26:13PM +, Jonathan Wakely wrote: On 11/02/16 15:20 +0100, Marek Polacek wrote: Does this look ok? Looks OK, although how about stressing that it was only allowed as an extension previously, e.g. ... So like this?

Re: [wwwdocs] Add a note about in-class initialization of static data member

2016-02-11 Thread Marek Polacek
On Thu, Feb 11, 2016 at 05:01:58PM +, Jonathan Wakely wrote: > On 11/02/16 17:39 +0100, Marek Polacek wrote: > >On Thu, Feb 11, 2016 at 03:26:13PM +, Jonathan Wakely wrote: > >>On 11/02/16 15:20 +0100, Marek Polacek wrote: > >>>Does this look ok? > >> > >>Looks OK, although how about stress

Re: [wwwdocs] Add a note about in-class initialization of static data member

2016-02-11 Thread Jonathan Wakely
On 11/02/16 17:39 +0100, Marek Polacek wrote: On Thu, Feb 11, 2016 at 03:26:13PM +, Jonathan Wakely wrote: On 11/02/16 15:20 +0100, Marek Polacek wrote: >Does this look ok? Looks OK, although how about stressing that it was only allowed as an extension previously, e.g. ... So like this?

Re: [wwwdocs] Add a note about in-class initialization of static data member

2016-02-11 Thread Marek Polacek
On Thu, Feb 11, 2016 at 03:26:13PM +, Jonathan Wakely wrote: > On 11/02/16 15:20 +0100, Marek Polacek wrote: > >Does this look ok? > > Looks OK, although how about stressing that it was only allowed as an > extension previously, e.g. ... So like this? I've also added a note about stricter fl

Re: [wwwdocs] Add a note about in-class initialization of static data member

2016-02-11 Thread Jonathan Wakely
On 11/02/16 15:20 +0100, Marek Polacek wrote: Does this look ok? Looks OK, although how about stressing that it was only allowed as an extension previously, e.g. ... Index: porting_to.html === RCS file: /cvs/gcc/wwwdocs/htdocs/g

[wwwdocs] Add a note about in-class initialization of static data member

2016-02-11 Thread Marek Polacek
Does this look ok? Index: porting_to.html === RCS file: /cvs/gcc/wwwdocs/htdocs/gcc-6/porting_to.html,v retrieving revision 1.9 diff -u -r1.9 porting_to.html --- porting_to.html 10 Feb 2016 17:21:54 - 1.9 +++ porting_to.h