Re: warn about deprecated access declarations

2011-12-13 Thread Fabien Chêne
2011/12/13 Miles Bader mi...@gnu.org: Jonathan Wakely jwakely@gmail.com writes: How about ...; suggest adding the using keyword? That sounds like the compiler is suggesting that the user suggests doing that! It is similar to suggest parentheses Good point, that's not correct

Re: warn about deprecated access declarations

2011-12-12 Thread Andreas Schwab
Jonathan Wakely jwakely@gmail.com writes: On 11 December 2011 22:22, Fabien Chêne wrote: Consequently, I propose to deprecate them with a warning, as clang already does. So that you get a warning for the following code: struct A { int i; }; struct B : A {  A::i; // - warning here

Re: warn about deprecated access declarations

2011-12-12 Thread Jonathan Wakely
On 12 December 2011 09:18, Andreas Schwab wrote: Jonathan Wakely jwakely@gmail.com writes: On 11 December 2011 22:22, Fabien Chêne wrote: Consequently, I propose to deprecate them with a warning, as clang already does. So that you get a warning for the following code: struct A { int

Re: warn about deprecated access declarations

2011-12-12 Thread Andreas Schwab
Jonathan Wakely jwakely@gmail.com writes: On 12 December 2011 09:18, Andreas Schwab wrote: Jonathan Wakely jwakely@gmail.com writes: On 11 December 2011 22:22, Fabien Chêne wrote: Consequently, I propose to deprecate them with a warning, as clang already does. So that you get a

Re: warn about deprecated access declarations

2011-12-12 Thread Jonathan Wakely
On 12 December 2011 10:08, Andreas Schwab wrote: Jonathan Wakely jwakely@gmail.com writes: On 12 December 2011 09:18, Andreas Schwab wrote: Jonathan Wakely jwakely@gmail.com writes: On 11 December 2011 22:22, Fabien Chêne wrote: Consequently, I propose to deprecate them with a

Re: warn about deprecated access declarations

2011-12-12 Thread Miles Bader
Jonathan Wakely jwakely@gmail.com writes: How about ...; suggest adding the using keyword? That sounds like the compiler is suggesting that the user suggests doing that! It is similar to suggest parentheses Good point, that's not correct English either, but it would be consistent.

warn about deprecated access declarations

2011-12-11 Thread Fabien Chêne
Hi, According to § 11.3/1 from c++98, access delarations are deprecated: The access of a member of a base class can be changed in the derived class by mentioning its qualified-id in the derived class declaration. Such mention is called an access declaration. The effect of an access declaration

Re: warn about deprecated access declarations

2011-12-11 Thread Jonathan Wakely
On 11 December 2011 22:22, Fabien Chêne wrote: Consequently, I propose to deprecate them with a warning, as clang already does. So that you get a warning for the following code: struct A { int i; }; struct B : A {  A::i; // - warning here }; warning: access declarations are

Re: warn about deprecated access declarations

2011-12-11 Thread Fabien Chêne
2011/12/11 Jonathan Wakely jwakely@gmail.com: On 11 December 2011 22:22, Fabien Chêne wrote: Consequently, I propose to deprecate them with a warning, as clang already does. So that you get a warning for the following code: struct A { int i; }; struct B : A {  A::i; // - warning